|
4 | 4 | class MyTestClass(BaseCase): |
5 | 5 |
|
6 | 6 | def test_basic(self): |
7 | | - self.open('https://xkcd.com/353/') # Navigate to the web page |
| 7 | + self.open("https://xkcd.com/353/") # Navigate browser to page |
8 | 8 | self.assert_element('img[alt="Python"]') # Assert element on page |
9 | 9 | self.click('a[rel="license"]') # Click element on page |
10 | | - self.assert_text('free to copy', 'div center') # Assert text on page |
| 10 | + self.assert_text("free to copy", "div center") # Assert text in area |
11 | 11 | self.open("https://xkcd.com/1481/") |
12 | 12 | title = self.get_attribute("#comic img", "title") # Get an attribute |
13 | 13 | self.assert_true("86,400 seconds per day" in title) |
14 | | - self.click('link=Blag') # Click on link |
15 | | - self.assert_text('The blag of the webcomic', 'h2') |
16 | | - self.update_text('input#s', 'Robots!\n') # Type text |
17 | | - self.assert_text('Hooray robots!', '#content') |
18 | | - self.open('https://xkcd.com/1319/') |
19 | | - self.assert_text('Automation', 'div#ctitle') |
| 14 | + self.click("link=Blag") # Click on link |
| 15 | + self.assert_text("The blag of the webcomic", "h2") |
| 16 | + self.update_text("input#s", "Robots!\n") # Type text |
| 17 | + self.assert_text("Hooray robots!", "#content") |
| 18 | + self.open("https://xkcd.com/1319/") |
| 19 | + self.assert_exact_text("Automation", "#ctitle") |
20 | 20 |
|
21 | 21 | #### |
22 | 22 |
|
|
0 commit comments