Skip to content

Commit 0b15034

Browse files
add sessionId in snapshot options
1 parent 27384dc commit 0b15034

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

selenium/lambdatest_selenium_driver/smartui.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ def smartui_snapshot(driver, name,options={}):
1717
resp = fetch_dom_serializer()
1818
driver.execute_script(resp['data']['dom'])
1919

20+
# Get the sessionId from the driver
21+
session_id = driver.session_id
22+
if session_id:
23+
options['sessionId'] = session_id # Append sessionId to options
24+
2025
# Serialize and capture the DOM
2126
dom = driver.execute_script(
2227
f"""

0 commit comments

Comments
 (0)