5.0.0-BETA2: ClassCastException: WebElement -> IOSElement
amedvedjev opened this issue · comments
Description
Failed to cast WebElement into IOSElement. Worked with 5.0.0-BETA1.
Environment
- java client build version or git revision if you use some shapshot: 5.0.0-BETA2
- Appium server version or git revision if you use some shapshot: 1.6.4-beta
- Mobile platform/version under test: iOS
- Real device or emulator/simulator: Simulator
Code To Reproduce Issue [ Good To Have ]
((IOSElement) driver.findElement(MobileBy.className("XCUIElementTypePickerWheel"))).setValue(countryName);
Ecxeption stacktraces
java.lang.ClassCastException: org.openqa.selenium.remote.RemoteWebElement cannot be cast to io.appium.java_client.ios.IOSElement
ok.
@amedvedjev
Please provide capabilities which you pass througt the driver constructor.
Also could you show the map that the method 'driver.getSessionDetails()' returns at your case?
@TikhomirovSergey
here is (removed some sensitive names)
Appium start:
start appium as: [appium, --log-level, error, --port, 4727, --bootstrap-port, 5727, --command-timeout, 90, --session-override]
Driver capabilities: (i know some deprecated...)
Capabilities [{app=/Users/jenkinss/Downloads/test_clients/xxxxx.app, preventWDAAttachments=false, noReset=false, clearSystemFiles=true, scaleFactor=0.5, version=, deviceName=iPhone 6s, iosInstallPause=200, fullReset=false, platform=MAC, wdaLaunchTimeout=60000, newCommandTimeout=120, platformVersion=10.2, automationName=XCuiTest, useNewWDA=true, browserName=, waitForAppScript=$.delay(3000); $.acceptAlert(); true;, wdaConnectionTimeout=60000}]
getSessionDetails:
{app=/Users/jenkinss/Downloads/test_clients/xxxx.app, preventWDAAttachments=false, noReset=false, clearSystemFiles=true, scaleFactor=0.5, CFBundleIdentifier=com.xxxx.xxxx, version=, deviceName=iPhone 6s, iosInstallPause=200, fullReset=false, platform=MAC, wdaLaunchTimeout=60000, newCommandTimeout=120, platformVersion=10.2, automationName=XCuiTest, useNewWDA=true, browserName=xxxxxx, waitForAppScript=$.delay(3000); $.acceptAlert(); true;, sdkVersion=10.2, udid=A5C64DB4-1CF2-4A4A-9443-8B22505A30C6, platformName=iOS, wdaConnectionTimeout=60000, device=iphone}
browserName=xxxxxx
@amedvedjev
Is it browser test? Is there non empty value?
no. it is name of our application. Target name to compile in xCode.
Let say we have app name Tester for prod and Tester_Alpha_1 for some alpha environment. in this case it is Tester_Alpha_1 name.
@amedvedjev
We (I am and @SrinivasanTarget ) are investigating the problem. It may be the critical server side issue that have to be fixed on the server-side. We will update you soon.
Does exist a workaround for this, or should I just go back to Beta1?
@amedvedjev I will propose the workaround today. re-implemented isBrowser
method will check only current context for now
@amedvedjev @derunewige
The BET3 was published. Soon it should be available and then you can check it.