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

Unrecognized platform: iOS @Selenium-server-standalone-3.5.0 #9042

Closed
PremRG opened this Issue Aug 17, 2017 · 14 comments

Comments

Projects
None yet
8 participants
@PremRG

PremRG commented Aug 17, 2017

Hello,
I have a problem with Appium (I tried 1.6.5) when running tests on iOS (10.2). The problem is that I need to find element in web view .
It throws Unrecognized platform: iOS

org.openqa.selenium.WebDriverException: Unrecognized platform: iOS
Build info: version: '3.5.0', revision: '8def36e068', time: '2017-08-10T23:00:22.093Z'
System info: host: 'Admins-MacBook-Pro.local', ip: 'fe80:0:0:0:18c8:cfab:4f68:d922%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'
Driver info: driver.version: IOSDriver
at org.openqa.selenium.Platform.fromString(Platform.java:300)
at org.openqa.selenium.Capabilities.getPlatform(Capabilities.java:46)
at org.openqa.selenium.remote.RemoteWebDriver.toString(RemoteWebDriver.java:1100)
at java.util.Formatter$FormatSpecifier.printString(Formatter.java:2886)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2763)
at java.util.Formatter.format(Formatter.java:2520)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at org.openqa.selenium.remote.RemoteWebElement.setFoundBy(RemoteWebElement.java:62)
at org.openqa.selenium.remote.RemoteWebDriver.setFoundBy(RemoteWebDriver.java:430)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:423)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:62)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.findElement(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByName(RemoteWebDriver.java:489)
at io.appium.java_client.DefaultGenericMobileDriver.findElementByName(DefaultGenericMobileDriver.java:110)
at io.appium.java_client.AppiumDriver.findElementByName(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.findElementByName(IOSDriver.java:1)
at com.appium.testcase.AppiumTest1.test2(AppiumTest1.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

@imurchie

This comment has been minimized.

Show comment
Hide comment
@imurchie

imurchie Aug 17, 2017

Member

Please provide the full Appium server logs as a link to a gist.

Member

imurchie commented Aug 17, 2017

Please provide the full Appium server logs as a link to a gist.

@PremRG PremRG changed the title from Unrecognized platform: iOS to Unrecognized platform: iOS @Selenium-server-standalone-3.5.0 Aug 17, 2017

@PremRG

This comment has been minimized.

Show comment
Hide comment
@imurchie

This comment has been minimized.

Show comment
Hide comment
@imurchie

imurchie Aug 17, 2017

Member

Where is the error happening? The server is returning a valid element at the end of this log.

Member

imurchie commented Aug 17, 2017

Where is the error happening? The server is returning a valid element at the end of this log.

@RishiKhanna

This comment has been minimized.

Show comment
Hide comment
@RishiKhanna

RishiKhanna Aug 18, 2017

Even I am receiving exactly the same error. org.openqa.selenium.WebDriverException: Unrecognized platform: iOS
Attached is the appium log file:
https://gist.github.com/RishiKhanna/5f9d1562ebdf234a993cdf41f3e153ff

RishiKhanna commented Aug 18, 2017

Even I am receiving exactly the same error. org.openqa.selenium.WebDriverException: Unrecognized platform: iOS
Attached is the appium log file:
https://gist.github.com/RishiKhanna/5f9d1562ebdf234a993cdf41f3e153ff

@PremRG

This comment has been minimized.

Show comment
Hide comment
@PremRG

PremRG commented Aug 18, 2017

screen shot 2017-08-18 at 12 19 38 pm

@Yaromudr

This comment has been minimized.

Show comment
Hide comment
@Yaromudr

Yaromudr Aug 18, 2017

I use

compile ('io.appium:java-client:5.0.0-BETA9'){
        exclude module: 'selenium-api'
        exclude module: 'selenium-remote-driver'
    }
    compile 'org.seleniumhq.selenium:selenium-api:3.4.0'
    compile 'org.seleniumhq.selenium:selenium-remote-driver:3.4.0'

Yaromudr commented Aug 18, 2017

I use

compile ('io.appium:java-client:5.0.0-BETA9'){
        exclude module: 'selenium-api'
        exclude module: 'selenium-remote-driver'
    }
    compile 'org.seleniumhq.selenium:selenium-api:3.4.0'
    compile 'org.seleniumhq.selenium:selenium-remote-driver:3.4.0'
@deedora

This comment has been minimized.

Show comment
Hide comment
@deedora

deedora Aug 18, 2017

I've had the same problem with 'selenium-server-standalone-3.5.0.jar'. 3.4.0 works just fine.

deedora commented Aug 18, 2017

I've had the same problem with 'selenium-server-standalone-3.5.0.jar'. 3.4.0 works just fine.

@RishiKhanna

This comment has been minimized.

Show comment
Hide comment
@RishiKhanna

RishiKhanna Aug 18, 2017

I am using 3.4.0 Selenium Binaries without any issues, the problem just showed up yesterday. Any idea how to resolve it?

RishiKhanna commented Aug 18, 2017

I am using 3.4.0 Selenium Binaries without any issues, the problem just showed up yesterday. Any idea how to resolve it?

@mikehamlin

This comment has been minimized.

Show comment
Hide comment
@mikehamlin

mikehamlin Aug 19, 2017

I fixed the autoupdate to 3.5.1 on selenium-api and selenium-remote-driver by setting htmlunit-driver to version 2.27:

compile group: 'org.seleniumhq.selenium',name: 'htmlunit-driver',version:'2.27'

mikehamlin commented Aug 19, 2017

I fixed the autoupdate to 3.5.1 on selenium-api and selenium-remote-driver by setting htmlunit-driver to version 2.27:

compile group: 'org.seleniumhq.selenium',name: 'htmlunit-driver',version:'2.27'

@RishiKhanna

This comment has been minimized.

Show comment
Hide comment
@RishiKhanna

RishiKhanna Aug 19, 2017

@mikehamlin The version 3.5.1 is now available on Maven Central
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.5.1'

RishiKhanna commented Aug 19, 2017

@mikehamlin The version 3.5.1 is now available on Maven Central
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '3.5.1'

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
Member

SrinivasanTarget commented Aug 19, 2017

@mikehamlin

This comment has been minimized.

Show comment
Hide comment
@mikehamlin

mikehamlin Aug 19, 2017

@RishiKhanna I realize that 3.51 is available, however upgrading to 3.5.1 causes this bug with iOS. I had set my selenium-java dependency to 3.4.0 but found that selenium-api, selenium-remote-driver were updating to 3.5.1. By setting htmlunit-driver to 2.27 it reset those libraries to 3.40 which resolved this issue until a fix is in place. I assume java-client needs to be fixed to be compatible with selenium 3.5.1

This appears to be a better approach for future reference:

compile ('org.seleniumhq.selenium:selenium-api:3.4.0'){force = true}
compile ('org.seleniumhq.selenium:selenium-remote-driver:3.4.0'){force = true}
compile ('org.seleniumhq.selenium:selenium-support:3.4.0'){force = true}

mikehamlin commented Aug 19, 2017

@RishiKhanna I realize that 3.51 is available, however upgrading to 3.5.1 causes this bug with iOS. I had set my selenium-java dependency to 3.4.0 but found that selenium-api, selenium-remote-driver were updating to 3.5.1. By setting htmlunit-driver to 2.27 it reset those libraries to 3.40 which resolved this issue until a fix is in place. I assume java-client needs to be fixed to be compatible with selenium 3.5.1

This appears to be a better approach for future reference:

compile ('org.seleniumhq.selenium:selenium-api:3.4.0'){force = true}
compile ('org.seleniumhq.selenium:selenium-remote-driver:3.4.0'){force = true}
compile ('org.seleniumhq.selenium:selenium-support:3.4.0'){force = true}

@SrinivasanTarget

This comment has been minimized.

Show comment
Hide comment
@SrinivasanTarget
Member

SrinivasanTarget commented Aug 19, 2017

Tracked here: appium/java-client#696

@mvpmurali

This comment has been minimized.

Show comment
Hide comment
@mvpmurali

mvpmurali Sep 12, 2017

This issue is fixed in current version of Selenium Server(3.5.3) and appium java client(5.0.3)

mvpmurali commented Sep 12, 2017

This issue is fixed in current version of Selenium Server(3.5.3) and appium java client(5.0.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment