Search code examples
androidselenium-webdriverwebdriver-iobrowserstack

WebdriverIO Android Automation on Browserstack


I am trying to test against Android Chrome on Browserstack with my current WDIO UI suite. Unfortunately, I'm getting a lot of the same type of error with the WDIO API.

ERROR webdriver: Request failed with status 404 due to Error: The URL '/wd/hub/session/b342b7b2ab7507bbbf00abdd06911e98a681d695/execute/sync' did not map to a valid resource

ERROR webdriver: Request failed with status 404 due to Error: The URL '/wd/hub/session/b8b0275616124b56a369d3df865b7cd2ac0e5d8b/actions' did not map to a valid resource

In particular, I'm trying to scroll down the page, and have tried everything from moveTo() and scrollIntoView(), to executing raw Javascript and sending the up and down arrow keys. They all result in one of the above errors. It seems like Android simply doesn't support these parts of the WDIO API. Am I missing something?


Solution

  • Looks like the commands are posted in W3C format.

    Can you try adding the below capability?

    "browserstack.appium_version" : "1.17.0",
    "browserstack.use_w3c": "true"
    

    References:

    1. https://www.browserstack.com/automate/capabilities
    2. https://www.w3.org/TR/webdriver/