Skip to content

Commit 028ed8e

Browse files
author
Gaurav Singh
committed
Chapter 6: Understanding match levels: Layout
Change log: Added a test for the internet site by elemental selenium to show handling of dynamic content with use of MatchLevel.LAYOUT Set match level as LAYOUT in conftest.py file and changed the app under test.
1 parent aaec47d commit 028ed8e

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from automation.tests.conftest import validate_window
22

33

4-
def test_match_level_content(driver, eyes):
5-
validate_window(driver, eyes)
4+
def test_match_level_layout(driver, eyes):
5+
validate_window(driver, eyes)
6+

automation/tests/conftest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
from automation.config.base import APPLITOOLS_API_KEY
77

8-
APP_NAME = 'automation_bookstore'
9-
APP_UNDER_TEST = 'file:///Users/gaurav/Self/Dev/automated-visual-testing/website/index.html'
8+
APP_NAME = 'the-internet'
9+
APP_UNDER_TEST = 'https://the-internet.herokuapp.com/dynamic_content'
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.CONTENT
34+
eyes.match_level = MatchLevel.LAYOUT
3535
eyes.check_window(tag=tag)
3636
close_eyes(eyes)
3737

0 commit comments

Comments
 (0)