Hi there,
I am new to this tool and started using it recently. Please be patience if my question is already answered.
I have defined the testobjects in the object repository. In my script I need to use them with selenium code
Ex. I have WebUI.mouseOver(findTestObject(‘Page_Home Agency Refresh/h2_Featured Careers’))
“selenium code”
List FeaturedJobsList = driver.findElements(By.cssSelector(‘div.career-card’))
in the above code instead of I redefining the object by cssselector I want to refer to the test object that I have used in WebUI line something like
List FeaturedJobsList = driver.findElements(‘Page_Home Agency Refresh/h2_Featured Careers’)
You can find the source of com.kms.katalon.core.testobject.TestObject class.
Please mind that the version of this source is not disclosed so that I am not sure if it is up to date or not.
By reading this, you would be able to find several ways how to inspect the internal of this class. In the end you may find a way to extract the CSS Selector out of the TestObject. Once found, you would want to pass it to the driver.findElements(By.cssSelector(....)) part.