-
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
calls adb startUri under the hood so users can deep link to a dynamic place in their AUT
- Loading branch information
Showing
4 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import chai from 'chai'; | ||
import chaiAsPromised from 'chai-as-promised'; | ||
import { AndroidDriver } from '../../../..'; | ||
|
||
chai.should(); | ||
chai.use(chaiAsPromised); | ||
|
||
let driver; | ||
let defaultCaps = { | ||
appPackage: 'com.android.browser', | ||
appActivity: '.BrowserActivity', | ||
deviceName: 'Android', | ||
platformName: 'Android' | ||
}; | ||
|
||
describe('setUrl', function(){ | ||
before(async () => { | ||
driver = new AndroidDriver(); | ||
await driver.createSession(defaultCaps); | ||
}); | ||
after(async () => { | ||
await driver.deleteSession(); | ||
}); | ||
it('should be able to start a data uri via setUrl', async () => { | ||
await driver.setUrl('http://saucelabs.com'); | ||
let el = await driver.findElOrEls('id', 'com.android.browser:id/url', false); | ||
await driver.getText(el.ELEMENT).should.eventually.include('saucelabs.com'); | ||
}); | ||
}); |