Skip to content

Commit 9bd345b

Browse files
authored
Add selective regions example for Robot Framework (#638)
1 parent 72b4101 commit 9bd345b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

python/robot-framework/tests/login_tests/login.robot

+11
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ Valid Login
1313
${username} = Setup User
1414
Input Username ${username}
1515
Input Password secret_sauce
16+
17+
# Capture snapshot with selective regions
18+
${username_element} Get Webelements id:user-name
19+
${password_element} Get Webelements id:password
20+
# Ignore all changes on ${username_element}
21+
${ignore_username} = Visual Ignore Element ${username_element} diffing_options={}
22+
# Only checks for style changes on ${password_element}
23+
${ignore_password} = Visual Ignore Element ${password_element} diffing_options={"style":True}
24+
${ignore_regions} = Create List ${ignore_username} ${ignore_password}
25+
Visual Snapshot Login Page capture_dom=True ignore_regions=${ignore_regions} diffing_method=BALANCED
26+
1627
Submit Credentials
1728
Welcome Page Should Be Open
1829
Visual Snapshot Valid Login capture_dom=True

0 commit comments

Comments
 (0)