Skip to content

Instantly share code, notes, and snippets.

@dannyshain
Created November 22, 2021 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dannyshain/60d0b519292ea9b376265d4954d0d8d8 to your computer and use it in GitHub Desktop.
Save dannyshain/60d0b519292ea9b376265d4954d0d8d8 to your computer and use it in GitHub Desktop.
*** Settings ***
Library SeleniumLibrary
Library EyesLibrary
*** Variables ***
${clickDiffLink}= ${False}
*** Test Cases ***
Compare The Random Number Sentence
Open Browser https://applitools.github.io/demo Chrome
Eyes Open
Run Keyword If ${clickDiffLink} Click Link ?diff
# Visual Check the random number string
Eyes Check Region By Selector xpath://span[@class='primary']/.. With Name Random Number Sentence
# Check page ignoring the random number string
Eyes Check Target Window Fully With Name Login Page Ignoring Random Number Sentence
... Ignore Region By Selector xpath://span[@class='primary']/..
# Check page ignoring all but the diff link
Eyes Check Target Window Fully With Name Login Page Ignoring All But Diff Link
... Ignore Region By Selector xpath://span[@class='primary']/..
... Ignore Region By Selector css:div.section:first-child
... Ignore Region By Selector css:div.button-section
Eyes Close Async
Close All Browsers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment