Error in findElements: Cannot cast object '[[[CChromeDriver: chrome on WINDOWS

My Scenario:

Enter in Search field and select value from Autocomplete list

Error is shown in ‘Cannot cast object’. Please suggeet.

1 Like

What do you mean “W” here?

Screenshot 2023-11-10 at 19.40.00

this is WebUI.findWebElements

It’s not shown in your script, but contextually it looks like you’ve either created a WebDriver or got one from Katalon and assigned it to a variable name ‘W’? (Note, this is why it’s important to name things correctly. Why not just call this ‘driver’?)

Can you show is where you define the ‘W’ variable?

class name may be the one we look,not variables.
imports we may like to see, mhm mhm
an alias we have or we just look in the dark?

in what book?

@sameuser

If you have got bored with preparing TestObjects in the Object Repository and you would like to create a TestObject programmatically in the Script view, it’s possible. See the following documentation

And you don’t need to call the org.openqa.selenium.WebDriver.findElements(By) directly. Katalon provides a Keyword which is a thin wrappper for it:

2 Likes

sorry for wrong information. The problem is solved for me.
I used WebUICommonHelper.findWebElements()

1 Like