appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

5.0.0: Brokes iOS tests

amedvedjev opened this issue · comments

Description

Move from 5.0.0-BETA9 -> 5.0.0 cause iOS tests fail to find any element

Environment

  • java client build version or git revision if you use some shapshot: 5.0.0
  • Appium server version or git revision if you use some shapshot: 1.6.6-beta.4
  • Desktop OS/version used to run Appium if necessary: macOS 10.12.6
  • Mobile platform/version under test: iOS Simulator

Code To Reproduce Issue [ Good To Have ]

    @iOSFindBy(id = "xxxxxx")
    private List<IOSElement> mainContainer;

    // ....

    !mainContainer.isEmpty();

Ecxeption stacktraces

org.openqa.selenium.WebDriverException: org.openqa.selenium.WebDriverException: Unrecognized platform: iOS
Build info: version: '3.5.2', revision: '10229a9', time: '2017-08-21T17:29:55.15Z'
System info: host: 'aleks.local', ip: '192.168.2.4', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_131'
Driver info: driver.version: AppiumDriver

at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:187)
at io.appium.java_client.pagefactory.AppiumElementLocator$WaitingFunction.apply(AppiumElementLocator.java:1)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:209)
at io.appium.java_client.pagefactory.AppiumElementLocator.waitFor(AppiumElementLocator.java:91)
at io.appium.java_client.pagefactory.AppiumElementLocator.findElements(AppiumElementLocator.java:133)
at io.appium.java_client.pagefactory.interceptors.InterceptorOfAListOfElements.intercept(InterceptorOfAListOfElements.java:50)
at $java.util.ArrayList$$EnhancerByCGLIB$$c0a2d785.isEmpty(<generated>)
at com.xxxx.pages.ios.xxxx.xxxxxx(xxxxx.java:54)

Link to Appium logs

2017-08-28 12:13:02:801 - [HTTP] --> POST /wd/hub/session/1de3a575-8506-4df8-95b9-9689c461c92a/timeouts {"type":"implicit","ms":0}
2017-08-28 12:13:02:802 - [debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: ["implicit",0,"1de3a575-8506-4df8-95b9-9689c461c92a"]
2017-08-28 12:13:02:802 - [debug] [XCUITest] Executing command 'timeouts'
2017-08-28 12:13:02:804 - [debug] [BaseDriver] Set implicit wait to 0ms
2017-08-28 12:13:02:804 - [debug] [MJSONWP] Responding to client with driver.timeouts() result: null
2017-08-28 12:13:02:804 - [HTTP] <-- POST /wd/hub/session/1de3a575-8506-4df8-95b9-9689c461c92a/timeouts 200 3 ms - 76
2017-08-28 12:13:02:807 - [HTTP] --> GET /wd/hub/session/1de3a575-8506-4df8-95b9-9689c461c92a/context {}
2017-08-28 12:13:02:808 - [debug] [MJSONWP] Calling AppiumDriver.getCurrentContext() with args: ["1de3a575-8506-4df8-95b9-9689c461c92a"]
2017-08-28 12:13:02:808 - [debug] [XCUITest] Executing command 'getCurrentContext'
2017-08-28 12:13:02:810 - [debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
2017-08-28 12:13:02:811 - [HTTP] <-- GET /wd/hub/session/1de3a575-8506-4df8-95b9-9689c461c92a/context 200 3 ms - 84
2017-08-28 12:13:02:814 - [HTTP] --> POST /wd/hub/session/1de3a575-8506-4df8-95b9-9689c461c92a/elements {"using":"id","value":"xxxxxx"}
2017-08-28 12:13:02:814 - [debug] [MJSONWP] Calling AppiumDriver.findElements() with args: ["id","xxxxxx","1de3a575-8506-4df8-95b9-9689c461c92a"]
2017-08-28 12:13:02:814 - [debug] [XCUITest] Executing command 'findElements'
2017-08-28 12:13:02:816 - [debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
2017-08-28 12:13:02:817 - [debug] [BaseDriver] Waiting up to 0 ms for condition
2017-08-28 12:13:02:818 - [debug] [JSONWP Proxy] Proxying [POST /elements] to [POST http://localhost:8100/session/51967F2C-AC5B-46F0-BD61-3AD0F24FD06D/elements] with body: {"using":"id","value":"xxxxx"}
2017-08-28 12:13:02:957 - [debug] [JSONWP Proxy] Got response with status 200: {"value":[{"ELEMENT":"328606E0-86FD-40BF-A8CD-1A9BC18F3AAC"}],"sessionId":"51967F2C-AC5B-46F0-BD61-3AD0F24FD06D","status":0}
2017-08-28 12:13:02:958 - [debug] [MJSONWP] Responding to client with driver.findElements() result: [{"ELEMENT":"328606E0-86FD-40BF-A8CD-1A9BC18F3AAC"}]
2017-08-28 12:13:02:958 - [HTTP] <-- POST /wd/hub/session/1de3a575-8506-4df8-95b9-9689c461c92a/elements 200 144 ms - 124
2017-08-28 12:13:02:965 - [HTTP] --> POST /wd/hub/session/1de3a575-8506-4df8-95b9-9689c461c92a/timeouts {"type":"implicit","ms":1000}
2017-08-28 12:13:02:966 - [debug] [MJSONWP] Calling AppiumDriver.timeouts() with args: ["implicit",1000,"1de3a575-8506-4df8-95b9-9689c461c92a"]
2017-08-28 12:13:02:966 - [debug] [XCUITest] Executing command 'timeouts'
2017-08-28 12:13:02:968 - [debug] [BaseDriver] Set implicit wait to 1000ms
2017-08-28 12:13:02:968 - [debug] [MJSONWP] Responding to client with driver.timeouts() result: null
2017-08-28 12:13:02:968 - [HTTP] <-- POST /wd/hub/session/1de3a575-8506-4df8-95b9-9689c461c92a/timeouts 200 3 ms - 76