How to click first element when getting the error: Found 3 web elements with sample xpath?

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)

Hi Bui,
You might want to try
xpath: (//label[(text() = ’ 117 - NHTMCP DT&PTVN-CN BINH DIEN SAI GON ’ or . = ’ 117 - NHTMCP DT&PTVN-CN BINH DIEN SAI GON ')])[1]

Hi Bui,
You might want to try
xpath: (//label[(text() = ’ 117 - NHTMCP DT&PTVN-CN BINH DIEN SAI GON ’ or . = ’ 117 - NHTMCP DT&PTVN-CN BINH DIEN SAI GON ')])[1]

Similar to Hansen’s with a little betterment:

//label[(contains(text() , '117 - NHTMCP DT&PTVN-CN BINH DIEN SAI GON')][1]