File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ from seleniumbase import BaseCase
2
+
3
+
4
+ class AutomatedVisualTest (BaseCase ):
5
+
6
+ def test_applitools_helloworld (self ):
7
+ self .open ('https://applitools.com/helloworld?diff1' )
8
+ print ('Creating baseline in "visual_baseline" folder...' )
9
+ self .check_window (name = "helloworld" , baseline = True )
10
+ self .click ('a[href="?diff1"]' )
11
+ # Verify html tags match previous version
12
+ self .check_window (name = "helloworld" , level = 1 )
13
+ # Verify html tags + attributes match previous version
14
+ self .check_window (name = "helloworld" , level = 2 )
15
+ # Verify html tags + attributes + values match previous version
16
+ self .check_window (name = "helloworld" , level = 3 )
17
+ # Change the page enough for a Level-3 comparison to fail
18
+ self .click ("button" )
19
+ self .check_window (name = "helloworld" , level = 1 )
20
+ self .check_window (name = "helloworld" , level = 2 )
21
+ with self .assertRaises (Exception ):
22
+ self .check_window (name = "helloworld" , level = 3 )
23
+ # Now that we know the exception was raised as expected,
24
+ # let's print out the comparison results by running in Level-0.
25
+ self .check_window (name = "helloworld" , level = 0 )
You can’t perform that action at this time.
0 commit comments