TestObject to WebElement

How to convert TestObject to WebElement?
Created a custom keyword where i used this line
JavascriptExecutor executor = (JavascriptExecutor)driver.executeScript(“arguments[0].click();”, ele)

Now here ele is a WebElement object but this above line is within a method
----def javascriptClickNew(TestObject objectname){ ---------
which accepts TestObject argument …So how to convert TestObject to WebElement?

Try WebUiCommonHelper.findWebElement(to, 30).

1 Like

Thanks…solved… :slight_smile:

1 Like