With groovy script on Katalon, I want to click on first row of grid but it is not working and it shows error (error.png with Option1 mentioned below) in console.
I have tried by targeting different element’s xpath of row but it seems click() event is not being recognized. Also, added wait and waitForPresentElement but did not work.
Following are three options I tried so far but none of them worked.
Option 1:
WebUiCommonHelper.findWebElement(By.xpath("//div[@class='dgrid-row dgrid-row-even ui-state-default']/table/tr/td/span[@class='dijitIconFlag dijitFixedMatterIcon']")).click()
Option 2:
WebUiCommonHelper.findWebElement(By.xpath("//div[@class='dgrid-row dgrid-row-even ui-state-default']/table/tr/td[contains(@class,'dgrid-cell dgrid-cell-padding dgrid-column-0-')]").click()
Option 3:
WebUI.click(findTestObject('Object Repository/Page_Law Practice Management Software CosmoLex/td_Client Funds-Trust_dgrid-cell dgrid-cell_865aa6'))
Source Code ::
Expected Output ::
The row should be selected/clicked.
Error ::
groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.common.WebUiCommonHelper.findWebElement() is applicable for argument types: (org.openqa.selenium.By$ByXPath) values: [By.xpath: //*[@id=“dgrid_1-row-9cfecd21-e608-452d-9ffc-348bd9a8b695”]/table/tr/td[4]/span]