Skip to content

Commit a2a8161

Browse files
omacrangerLogan Graham
and
Logan Graham
authored
Update python examples & dependencies (#682)
* update python examples & versions * remove session_id --------- Co-authored-by: Logan Graham <[email protected]>
1 parent 4d8a680 commit a2a8161

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

python/no-framework/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
selenium==4.21.0
2-
saucelabs-visual==0.0.12
1+
selenium==4.23.1
2+
saucelabs-visual==0.1.0

python/no-framework/test.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ def main():
3737
driver = get_driver()
3838
log_step("Starting Test")
3939

40-
# Session ID is required for various calls when taking snapshots of running sessions
41-
session_id = driver.session_id
4240
visual_client = SauceLabsVisual()
4341

4442
# Create the visual build.
@@ -50,7 +48,7 @@ def main():
5048
assert "Swag Labs" in driver.title
5149
visual_client.create_snapshot_from_webdriver(
5250
"Before Login",
53-
session_id=session_id,
51+
driver=driver,
5452
# Both of these fields are optional, but if your test framework supports them,
5553
# or you identify your tests in a meaningful way we recommend setting them as they
5654
# provide additional ways for you to group and manage your tests in the Sauce Visual UI.
@@ -78,7 +76,7 @@ def main():
7876
add_to_cart_button = driver.find_element(By.CSS_SELECTOR, '.btn_inventory')
7977
visual_client.create_snapshot_from_webdriver(
8078
"Inventory Page",
81-
session_id=session_id,
79+
driver=driver,
8280
# Enable DOM capture, False by default.
8381
capture_dom=True,
8482
full_page_config=FullPageConfig(
@@ -118,7 +116,7 @@ def main():
118116

119117
visual_client.create_snapshot_from_webdriver(
120118
"Inventory Page (Clipped)",
121-
session_id=session_id,
119+
driver=driver,
122120
# Clip the screenshot (and DOM capture) to a single element on the page
123121
clip_selector='#inventory_container',
124122
capture_dom=True,
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
robotframework==7.0.0
2-
robotframework-seleniumlibrary==6.4.0
3-
saucelabs-visual==0.0.12
1+
robotframework==7.0.1
2+
robotframework-seleniumlibrary==6.5.0
3+
saucelabs-visual==0.1.0

0 commit comments

Comments
 (0)