@@ -37,8 +37,6 @@ def main():
37
37
driver = get_driver ()
38
38
log_step ("Starting Test" )
39
39
40
- # Session ID is required for various calls when taking snapshots of running sessions
41
- session_id = driver .session_id
42
40
visual_client = SauceLabsVisual ()
43
41
44
42
# Create the visual build.
@@ -50,7 +48,7 @@ def main():
50
48
assert "Swag Labs" in driver .title
51
49
visual_client .create_snapshot_from_webdriver (
52
50
"Before Login" ,
53
- session_id = session_id ,
51
+ driver = driver ,
54
52
# Both of these fields are optional, but if your test framework supports them,
55
53
# or you identify your tests in a meaningful way we recommend setting them as they
56
54
# provide additional ways for you to group and manage your tests in the Sauce Visual UI.
@@ -78,7 +76,7 @@ def main():
78
76
add_to_cart_button = driver .find_element (By .CSS_SELECTOR , '.btn_inventory' )
79
77
visual_client .create_snapshot_from_webdriver (
80
78
"Inventory Page" ,
81
- session_id = session_id ,
79
+ driver = driver ,
82
80
# Enable DOM capture, False by default.
83
81
capture_dom = True ,
84
82
full_page_config = FullPageConfig (
@@ -118,7 +116,7 @@ def main():
118
116
119
117
visual_client .create_snapshot_from_webdriver (
120
118
"Inventory Page (Clipped)" ,
121
- session_id = session_id ,
119
+ driver = driver ,
122
120
# Clip the screenshot (and DOM capture) to a single element on the page
123
121
clip_selector = '#inventory_container' ,
124
122
capture_dom = True ,
0 commit comments