Skip to content

Commit 52866f8

Browse files
agarneha1331Ankit098
authored andcommitted
Added sessionName
1 parent c5c6652 commit 52866f8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/local-test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from selenium.webdriver.chrome.options import Options as ChromeOptions
44

55
options = ChromeOptions()
6-
6+
options.set_capability('sessionName', 'BStack Local Test')
77
# The webdriver management will be handled by the browserstack-sdk
88
# so this will be overridden and tests will run browserstack -
99
# without any changes to the test files!

tests/test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
from selenium.webdriver.support import expected_conditions as EC
55
from selenium.webdriver.common.by import By
66
from selenium.common.exceptions import NoSuchElementException
7+
from selenium.webdriver.chrome.options import Options as ChromeOptions
78

89
# The webdriver management will be handled by the browserstack-sdk
910
# so this will be overridden and tests will run browserstack -
1011
# without any changes to the test files!
11-
driver = webdriver.Chrome()
12+
options = ChromeOptions()
13+
options.set_capability('sessionName', 'BStack Sample Test')
14+
driver = webdriver.Chrome(options=options)
1215

1316
try:
1417
driver.get('https://bstackdemo.com/')

0 commit comments

Comments
 (0)