There are some objects that have sample xpath, so I used [1], [2]
in xpath to get first or second element but not successfully. How can I
do that ?
//label[(text()
= ’ 117 - NHTMCP DT&PTVN-CN BINH DIEN SAI GON ’ or . = ’ 117 -
NHTMCP DT&PTVN-CN BINH DIEN SAI GON ')][1]
The error detail:
Found
3 web elements with id: ‘Object Repository/Page_SWIFT EDITOR
3.0/label_122 - NHTMCP DTPTVN-CN H’ located by 'By.xpath:
//label[(text() = ’ 117 - NHTMCP DT&PTVN-CN BINH DIEN SAI GON ’
or . = ’ 117 - NHTMCP DT&PTVN-CN BINH DIEN SAI GON ')][1]
’ in ‘30’ second(s)