|
5 | 5 | from selenium.webdriver.support import expected_conditions as EC |
6 | 6 | import time |
7 | 7 |
|
| 8 | +# Options are only available since client version 2.3.0 |
| 9 | +# If you use an older client then switch to desired_capabilities |
| 10 | +# instead: https://github.com/appium/python-client/pull/720 |
8 | 11 | options = UiAutomator2Options().load_capabilities({ |
9 | 12 | # Specify device and os_version for testing |
10 | 13 | "platformName" : "android", |
11 | 14 | "platformVersion" : "9.0", |
12 | | - "deviceName" : "Google Pixel 3", |
13 | | - "project" : "BrowserStack Samples", |
14 | | - "build" : "browserstack build", |
15 | | - "name" : "BStack sample python-appium", |
| 15 | + "deviceName" : "Google Pixel 3" |
16 | 16 |
|
17 | | - # Set your access credentials |
18 | | - "browserstack.user" : "YOUR_USERNAME", |
19 | | - "browserstack.key" : "YOUR_ACCESS_KEY", |
20 | | - |
21 | | - # Set URL of the application under test |
22 | | - "app" : "bs://<app-id>", |
| 17 | + # Add your caps here |
23 | 18 | }) |
24 | 19 |
|
25 | | -# Initialize the remote Webdriver using BrowserStack remote URL |
26 | 20 | driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", options=options) |
27 | 21 |
|
28 | 22 | # Test case for the BrowserStack sample Android app. |
|
0 commit comments