Skip to content

Commit 92f9a52

Browse files
author
Neha Agarwal
authored
Merge pull request #31 from browserstack/revert-30-revert-29-fix-session-name-sdk
Revert "Revert "Added sessionName""
2 parents e7d9f77 + 9af5c54 commit 92f9a52

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

tests/local-test.py

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

55
options = ChromeOptions()
6+
options.set_capability('sessionName', 'BStack Local Test')
67

78
# The webdriver management will be handled by the browserstack-sdk
89
# so this will be overridden and tests will run browserstack -

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)