File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
seleniumbase/console_scripts Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 44class MyTestClass (BaseCase ):
55
66 def test_basic (self ):
7- self .open ("https://xkcd.com/353/" ) # Navigate browser to page
8- self .assert_element ('img[alt="Python"]' ) # Assert element on page
9- self .click ('a[rel="license"]' ) # Click element on page
10- self .assert_text ("free to copy" , "div center" ) # Assert text in area
7+ self .open ("https://xkcd.com/353/" )
8+ self .assert_element ('img[alt="Python"]' )
9+ self .click ('a[rel="license"]' )
10+ self .assert_text ("free to copy and reuse" )
1111 self .open ("https://xkcd.com/1481/" )
12- title = self .get_attribute ("#comic img" , "title" ) # Get an attribute
12+ title = self .get_attribute ("#comic img" , "title" )
1313 self .assert_true ("86,400 seconds per day" in title )
14- self .click ("link=Blag" ) # Click on link
14+ self .click ("link=Blag" )
1515 self .assert_text ("The blag of the webcomic" , "h2" )
16- self .update_text ("input#s" , "Robots!\n " ) # Type text
16+ self .update_text ("input#s" , "Robots!\n " )
1717 self .assert_text ("Hooray robots!" , "#content" )
1818 self .open ("https://xkcd.com/1319/" )
1919 self .assert_exact_text ("Automation" , "#ctitle" )
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ def test_basic(self):
77 self .open ("https://xkcd.com/353/" )
88 self .assert_element ('img[alt="Python"]' )
99 self .click ('a[rel="license"]' )
10- self .assert_text ("free to copy" , "div center " )
10+ self .assert_text ("free to copy and reuse " )
1111 self .open ("https://xkcd.com/1481/" )
1212 title = self .get_attribute ("#comic img" , "title" )
1313 self .assert_true ("86,400 seconds per day" in title )
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def main():
8282 data .append (' self.open("https://xkcd.com/353/")' )
8383 data .append (" self.assert_element('img[alt=\" Python\" ]')" )
8484 data .append (" self.click('a[rel=\" license\" ]')" )
85- data .append (' self.assert_text("free to copy", "div center ")' )
85+ data .append (' self.assert_text("free to copy and reuse ")' )
8686 data .append (' self.open("https://xkcd.com/1481/")' )
8787 data .append (
8888 " title = self.get_attribute(\" #comic img\" , \" title\" )" )
You can’t perform that action at this time.
0 commit comments