Last active
June 28, 2018 16:47
-
-
Save dpgraham/698b464a4cef376d6c2c93f0fdb00169 to your computer and use it in GitHub Desktop.
Android Instant Apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Call the method | |
await driver.execute("mobile: deepLink", {url: 'https://www.realtor.com/realestateandhomes-search/San-Jose_CA', package: 'com.move.realtor'}); | |
// If instant apps are enabled on this device, we should be able to switch | |
// to a native context and find elements | |
await driver.source().should.eventually.match(/com\.move\.realtor/); | |
// Check that we can find a native element and interact with it | |
const btn = await driver.elementsByXPath('//android.widget.Button'); | |
btn.length.should.be.above(0); | |
await btn[0].click(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for the Java execute method is here: http://appium.github.io/java-client/io/appium/java_client/ExecutesMethod.html