Hi,
I have a problem to find a testObject with following code:
GlobalVariable.asdf = WebUI.getText(findTestObject(‘Page_xyz/span_qwer’))
Error is:
Unable to get text of object ‘Object Repository/Page_xyz/span_qwer’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_xyz/span_qwer’ located by ‘By.xpath: //span[(matches(text(), ‘[0-9]{6}-[0-9]{4}-I[0-9]{5}’) or matches(., ‘[0-9]{6}-[0-9]{4}-I[0-9]{5}’))]’ not found)
My testobject has the condition “matches regex” with the value “[0-9]{6}-[0-9]{4}-I[0-9]{5}”
The Selector Editor shows this (uneditable):
//span[(matches(text(), ‘[0-9]{6}.[0-9]{4}.I[0-9]{5}’) or matches(., ‘[0-9]{6}.[0-9]{4}.I[0-9]{5}’))]
- Obeject Repository
- Page_xyz
- span_qwer
What am I doing wrong?
(of course there is a span with a text like 123456-1234-I12345)
Thanks