Here is another idea that creates a Test Object in code at run time. Instead of the bulky parameterization statement, this to me is much “simpler” to look at.
Create a Keyword like @kazurayam or @Russ_Thomas have of the “makeTO” method and then pass the pathway (either CSS or XPath) to create a Test Object, like:
myAssistant = com.Tools.makeTO("//*[@name='minor-child2-dob' and @id='minor-child2-dob']")
WebUI.click(myAssistant)
Edit: Do NOT create two methods exactly alike to do CSS and XPath because you will get an error. You must have two different names; one to do CSS and another to do XPath, like “makeTO” which could do XPath and “createTO” which could do CSS (because the method starts with “C” ). ![]()