Skip to content

Commit fcbb949

Browse files
committed
Update example tests
1 parent 1b93573 commit fcbb949

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

examples/my_first_test.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
class MyTestClass(BaseCase):
55

66
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
88
self.assert_element('img[alt="Python"]') # Assert element on page
99
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
1111
self.open("https://xkcd.com/1481/")
1212
title = self.get_attribute("#comic img", "title") # Get an attribute
1313
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")
2020

2121
####
2222

integrations/node_js/my_first_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ def test_basic(self):
1616
self.update_text('input#s', 'Robots!\n')
1717
self.assert_text('Hooray robots!', '#content')
1818
self.open('http://xkcd.com/1319/')
19-
self.assert_text('Automation', 'div#ctitle')
19+
self.assert_exact_text('Automation', '#ctitle')

seleniumbase/console_scripts/sb_mkdir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def main():
9393
data.append(" self.update_text('input#s', 'Robots!\\n')")
9494
data.append(" self.assert_text('Hooray robots!', '#content')")
9595
data.append(" self.open('https://xkcd.com/1319/')")
96-
data.append(" self.assert_text('Automation', 'div#ctitle')")
96+
data.append(" self.assert_exact_text('Automation', '#ctitle')")
9797
data.append("")
9898
file_path = "%s/%s" % (dir_name, "my_first_test.py")
9999
file = codecs.open(file_path, "w+", "utf-8")

0 commit comments

Comments
 (0)