Skip to content

Commit e987e03

Browse files
changes in height logic
1 parent c32595d commit e987e03

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

percy/snapshot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ def capture_responsive_dom(driver, cookies, config, percy_dom_script=None, **kwa
291291
dom_snapshots = []
292292
window_size = driver.get_window_size()
293293
current_width, current_height = window_size['width'], window_size['height']
294-
log(f'Before window size: {current_width}x{current_height}', 'debug')
295294
last_window_width = current_width
296295
resize_count = 0
297296
# Initialize resize listener once before the loop
@@ -319,9 +318,10 @@ def capture_responsive_dom(driver, cookies, config, percy_dom_script=None, **kwa
319318

320319
for width_dict in widths:
321320
width = width_dict['width']
321+
height = width_dict.get('height', target_height)
322322
if last_window_width != width:
323323
resize_count += 1
324-
change_window_dimension_and_wait(driver, width, target_height, resize_count)
324+
change_window_dimension_and_wait(driver, width, height, resize_count)
325325
last_window_width = width
326326

327327
if PERCY_RESPONSIVE_CAPTURE_RELOAD_PAGE:

0 commit comments

Comments
 (0)