Skip to content

Commit dee7171

Browse files
agarneha1331francisf
authored andcommitted
corrections
1 parent 6379852 commit dee7171

5 files changed

+10
-45
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Open `Android` or `iOS` folder :
104104
105105
- Ensure that `browserstackLocal` capability is set to `true` in the `browserstack.yml` file
106106
107-
- If you have uploaded your own app, update the app capability with the app id or directly upload the path to your app in the `browserstack.yml`
107+
- If you have uploaded your app then add the app id to the `browserstack.yml` config file, or you can directly specify the path to your app in the `browserstack.yml` file.
108108
109109
- Run `browserstack-sdk python browserstack_sample_local.py`
110110

android/browserstack_sample.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,18 @@
55
from selenium.webdriver.support import expected_conditions as EC
66
import time
77

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
811
options = UiAutomator2Options().load_capabilities({
912
# Specify device and os_version for testing
1013
"platformName" : "android",
1114
"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"
1616

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
2318
})
2419

25-
# Initialize the remote Webdriver using BrowserStack remote URL
2620
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", options=options)
2721

2822
# Test case for the BrowserStack sample Android app.

android/browserstack_sample_local.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,14 @@
99
# If you use an older client then switch to desired_capabilities
1010
# instead: https://github.com/appium/python-client/pull/720
1111
options = UiAutomator2Options().load_capabilities({
12-
# Set URL of the application under test
13-
"app" : "bs://<app-id>",
14-
1512
# Specify device and os_version for testing
1613
"deviceName": "Google Pixel 3",
1714
"platformName": "android",
1815
"platformVersion": "9.0",
19-
"project" : "BrowserStack Samples",
20-
"build" : "browserstack build",
21-
"name" : "BStack local python-appium",
22-
"browserstack.local" : "true",
2316

24-
# Set your access credentials
25-
"browserstack.user" : "YOUR_USERNAME",
26-
"browserstack.key" : "YOUR_ACCESS_KEY"
17+
# Add your caps here
2718
})
2819

29-
# Initialize the remote Webdriver using BrowserStack remote URL
3020
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", options=options)
3121

3222
# Test case for the BrowserStack sample Android app.

ios/browserstack_sample.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,14 @@
99
# If you use an older client then switch to desired_capabilities
1010
# instead: https://github.com/appium/python-client/pull/720
1111
options = XCUITestOptions().load_capabilities({
12-
# Set URL of the application under test
13-
"app" : "bs://<app-id>",
14-
1512
# Specify device and os_version for testing
1613
"deviceName": "iPhone 11 Pro",
1714
"platformName": "ios",
1815
"platformVersion": "13",
19-
"project" : "BrowserStack Samples",
20-
"build" : "browserstack build",
21-
"name" : "BStack sample python-appium",
2216

23-
# Set your access credentials
24-
"browserstack.user" : "YOUR_USERNAME",
25-
"browserstack.key" : "YOUR_ACCESS_KEY"
17+
# Add your caps here
2618
})
2719

28-
# Initialize the remote Webdriver using BrowserStack remote URL
2920
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", options=options)
3021

3122
# Test case for the BrowserStack sample iOS app.

ios/browserstack_sample_local.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,14 @@
99
# If you use an older client then switch to desired_capabilities
1010
# instead: https://github.com/appium/python-client/pull/720
1111
options = XCUITestOptions().load_capabilities({
12-
# Set URL of the application under test
13-
"app" : "bs://<app-id>",
14-
1512
# Specify device and os_version for testing
1613
"deviceName": "iPhone XS",
1714
"platformName": "ios",
18-
"platformVersion": "12",
19-
"project" : "BrowserStack Samples",
20-
"build" : "browserstack build",
21-
"name" : "BStack local python-appium",
22-
"browserstack.local" : "true",
15+
"platformVersion": "12"
2316

24-
# Set your access credentials
25-
"browserstack.user" : "YOUR_USERNAME",
26-
"browserstack.key" : "YOUR_ACCESS_KEY"
17+
# Add your caps here
2718
})
2819

29-
# Initialize the remote Webdriver using BrowserStack remote URL
3020
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", options=options)
3121

3222
# Test case for the BrowserStack sample iOS app.

0 commit comments

Comments
 (0)