@@ -8,15 +8,12 @@ def test_basic(self):
8
8
self .assert_element ('img[alt="Python"]' )
9
9
self .click ('a[rel="license"]' )
10
10
self .assert_text ("free to copy and reuse" )
11
- self .open ("https://xkcd.com/1481/" )
12
- title = self .get_attribute ("#comic img" , "title" )
13
- self .assert_true ("86,400 seconds per day" in title )
14
- self .click ("link=Store" )
15
- self .assert_element ('[alt="The xkcd store"]' )
11
+ self .go_back ()
12
+ self .click ("link=About" )
13
+ self .assert_text ("xkcd.com" , "h2" )
14
+ self .open ("https://store.xkcd.com/collections/everything" )
16
15
self .update_text ("input.search-input" , "xkcd book\n " )
17
- self .assert_text ("xkcd: volume 0" , "h3" )
18
- self .open ("https://xkcd.com/1319/" )
19
- self .assert_exact_text ("Automation" , "#ctitle" )
16
+ self .assert_exact_text ("xkcd: volume 0" , "h3" )
20
17
21
18
####
22
19
@@ -43,7 +40,7 @@ def test_basic(self):
43
40
#
44
41
# 2. Most methods have the optional `timeout` argument. Ex:
45
42
# [
46
- # self.get_text("#content" , timeout=15)
43
+ # self.assert_element('img[alt="Python"]' , timeout=15)
47
44
# ]
48
45
# The `timeout` argument tells the method how many seconds to wait
49
46
# for an element to appear before raising an exception. This is
@@ -76,6 +73,10 @@ def test_basic(self):
76
73
# title = element.get_attribute("title")
77
74
# ]
78
75
#
76
+ # 4. self.assert_exact_text(TEXT) ignores leading and trailing
77
+ # whitespace in the TEXT assertion.
78
+ # So, self.assert_exact_text("Some Text") will find [" Some Text "].
79
+ #
79
80
# For backwards-compatibilty, some SeleniumBase methods that do the
80
81
# same thing have multiple names, kept on from previous versions.
81
82
# Ex: wait_for_element_visible() is the same as find_element().
0 commit comments