Skip to content

Commit 61887e0

Browse files
author
Gaurav Singh
committed
Chapter 7: Checkpoints: Full page screenshot
Change log: Added test and modified eyes instance with `force_full_page_screenshot = True` to capture entire page instead of visible view port.
1 parent 028ed8e commit 61887e0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from automation.tests.conftest import validate_window
2+
3+
4+
def test_match_level_layout(driver, eyes):
5+
validate_window(driver, eyes)

automation/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from automation.config.base import APPLITOOLS_API_KEY
77

88
APP_NAME = 'the-internet'
9-
APP_UNDER_TEST = 'https://the-internet.herokuapp.com/dynamic_content'
9+
APP_UNDER_TEST = 'https://the-internet.herokuapp.com/large'
1010

1111

1212
@pytest.fixture(scope='function')
@@ -31,7 +31,7 @@ def initialize_eyes():
3131

3232
def validate_window(driver, eyes, tag=None):
3333
open_eyes(driver, eyes)
34-
eyes.match_level = MatchLevel.LAYOUT
34+
eyes.force_full_page_screenshot = True
3535
eyes.check_window(tag=tag)
3636
close_eyes(eyes)
3737

0 commit comments

Comments
 (0)