Looking for some help on getting the element count when the script was recorded. I’m not a Katalon newbie, but I’ve been putting off all test scripts that couldn’t be done strictly with the recorder for a while so this is my first time posting. I’m not sure how it works to combine recorded steps with manual. The “eleCount” part of the script is just something I tried from a post I read.
‘Verify Task Displays on the Page’
WebUI.verifyElementText(findTestObject(‘Object Repository/Page_Tasks/a_Automated Test - Recurring Task’), ‘Automated Test - Recurring Task’)
‘Verify task displays selected number of times’
def eleCount = driver.findElements(
By.class(“task-details”)).size()
The error I get is
Script1623691686823.groovy: 71: Invalid variable name. Must start with a letter but was: “task
. At [71:10] @ line 71, column 10.
By.class(“task-details”)).size()
Hi. I was able to figure this out. I copied the code from another source and the quotes didn’t convert properly. Fixed the quotes and I’m no longer seeing the error. Thanks