Allow xpath or css selector in place of findTestObject()

It would be great to allow xpaths or css selector locators to be valid parameters for WebUI keywords. The method would then create a temporary test object based on the locator type. This would reduce the amount of code needed (in script mode) and if using test object parameters, they could instead be used in an xpath with string literals, which also would clean up the ugliness of the parameter map and make the test case easier to read and maintain.

2 Likes

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

Hi @jalarie ,

Thank you for your suggestion. I see this is a kind of enhancement, right? I will let my team know your request and please expect that we will prioritize the requests based on the impact. You can help prove its huge impact on others for better support if possible. Thank you!

The following technique would help:

You can create Web objects programmatically in the Script View of a test case. This approach allows you to create test objects in runtime.

1 Like

Exactly.

What he’s basically asking for is to remove the need for findTestObject("path_to_object"). A sibling method, findElementByCSS("string") or findElementByXPath("string").

I asked for this back in 2018.

1 Like