Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.0-BETA2: ClassCastException: WebElement -> IOSElement #567

Closed
amedvedjev opened this issue Feb 6, 2017 · 10 comments
Closed

5.0.0-BETA2: ClassCastException: WebElement -> IOSElement #567

amedvedjev opened this issue Feb 6, 2017 · 10 comments
Assignees
Labels
Milestone

Comments

@amedvedjev
Copy link

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

@TikhomirovSergey
Copy link
Contributor

ok.

@TikhomirovSergey TikhomirovSergey self-assigned this Feb 6, 2017
@TikhomirovSergey
Copy link
Contributor

@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?

@amedvedjev
Copy link
Author

@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}

@TikhomirovSergey
Copy link
Contributor

TikhomirovSergey commented Feb 7, 2017

browserName=xxxxxx

@amedvedjev
Is it browser test? Is there non empty value?

@amedvedjev
Copy link
Author

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.

@TikhomirovSergey
Copy link
Contributor

@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.

@SrinivasanTarget
Copy link
Member

appium/appium#7730

@SrinivasanTarget SrinivasanTarget added this to the 5.0.0 milestone Feb 8, 2017
@derunewige
Copy link

Does exist a workaround for this, or should I just go back to Beta1?

@TikhomirovSergey
Copy link
Contributor

TikhomirovSergey commented Feb 10, 2017

@amedvedjev I will propose the workaround today. re-implemented isBrowser method will check only current context for now

@TikhomirovSergey
Copy link
Contributor

@amedvedjev @derunewige
The BET3 was published. Soon it should be available and then you can check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants