I am getting the error below when downloading katalon v10, this error does not appear on katalon v9 or earlier
Please let me know the cause of the error and how to fix it
Thank!
I am getting the error below when downloading katalon v10, this error does not appear on katalon v9 or earlier
Please let me know the cause of the error and how to fix it
Thank!
Are you sure kataon v10 and v9 uses same driver?
Try updating to latest driver and rerun the test?
Did you happen to read the changes that were in KS version 10 for mobile?
(see “Method 1”)
Thanks @dineshh and @grylion54 for helping me
But I have another problem with that method
I use appium 1.22.3 and jdk 23.0.1
Is the problem due to appium being too old?
The doc says this, so you are definitely in need of an update:
As for your Cast Exception, I don’t see where you have declared the variable, “elements”, but reading the error message, you have declared it as a “List”. The result of “findElement(By.className)” only returns a “RemoteWebElement” (on the righthand side). The error message says that you cannot cast the “RemoteWebElement” to a “List” so you will have to fix this cast statement.
kindly update your appium version
I upgraded appium but the error still exists
The above image is my code
How should I fix it?
Ah! This is a test for a mobile app
Again, as I mentioned in my previous post, you are trying to cast a “RemoteWebElement” to a “List”. You need to fix this. Perhaps you can change:
findElement(By.className(...)) // this returns a RemoteWebElement
to
findElements(By.className(...)) // plural so you will return a List
Thanks for your support! My problem is solved
And I have another small question: why is intValue() underlined
even though it works fine
And what do I need to fix to make intValue() un-underlined
Two variables G.width and G.height have type Number
You are using “intValue” as a method on a Global Variable. Global Variables are Objects, not specifically an Integer object. You can leave it as is with the “intValue” method underlined or convert the Global Variable to an Integer or Number object to remove the underline.
Mobile.swipe((G.width/2 as Integer).intValue(), (Integer)(G.height/2).intValue(), (Number)(G.width/2).intValue(), 300)
Thank you!