Skip to content

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

Closed

Description

@amedvedjev

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

Activity

  1. TikhomirovSergey commented on Feb 6, 2017

    @TikhomirovSergey
    Contributor

    ok.

  2. TikhomirovSergey commented on Feb 6, 2017

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

  3. amedvedjev commented on Feb 7, 2017

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

  4. TikhomirovSergey commented on Feb 7, 2017

    @TikhomirovSergey
    Contributor

    browserName=xxxxxx

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

  5. amedvedjev commented on Feb 7, 2017

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

  6. TikhomirovSergey commented on Feb 8, 2017

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

  7. SrinivasanTarget commented on Feb 8, 2017

    @SrinivasanTarget
    Member
  8. added this to the 5.0.0 milestone on Feb 8, 2017
  9. derunewige commented on Feb 10, 2017

    @derunewige

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

  10. TikhomirovSergey commented on Feb 10, 2017

    @TikhomirovSergey
    Contributor

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

  11. added a commit that references this issue on Feb 13, 2017
  12. TikhomirovSergey commented on Feb 13, 2017

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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions