Skip to content

Commit 7181b0f

Browse files
committed
Update examples
1 parent bc24277 commit 7181b0f

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

examples/my_first_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def test_basic(self):
5757
# * Types in the new text
5858
# * Hits Enter/Submit (if the text ends in "\n")
5959
#
60-
# self.update_text(S, T) can also be written as self.input(S, T)
60+
# self.update_text(S, T) can also be written as self.type(S, T)
6161
#
6262
# 4. There's usually more than one way to do the same thing. Ex:
6363
# [

examples/offline_examples/test_demo_page.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ def test_demo_page(self):
2121
# Assert that the text appears within a given element
2222
self.assert_text("Demo Page", "h1")
2323

24-
# Update the text of various text fields on the page
25-
self.update_text("#myTextInput", "This is Automated")
26-
self.update_text("textarea.area1", "Testing Time!\n")
27-
self.update_text('[name="preText2"]', "Typing Text!")
24+
# Type/update text in text fields on the page
25+
self.type("#myTextInput", "This is Automated")
26+
self.type("textarea.area1", "Testing Time!\n")
27+
self.type('[name="preText2"]', "Typing Text!")
2828

2929
# Verify that a hover dropdown link changes page text
3030
self.assert_text("Automation Practice", "h3")
@@ -92,9 +92,8 @@ def test_demo_page(self):
9292
# Assert link text - Use click_link_text() to click
9393
self.assert_link_text("seleniumbase.com")
9494
self.assert_link_text("SeleniumBase on GitHub")
95-
96-
# Assert the title of the current web page
97-
self.assert_link_text("seleniumbase.com")
98-
self.assert_link_text("SeleniumBase on GitHub")
9995
self.assert_link_text("seleniumbase.io")
10096
self.assert_link_text("SeleniumBase Demo Page")
97+
98+
# Assert exact text
99+
self.assert_exact_text("Demo Page", "h1")

examples/test_demo_site.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ def test_demo_site(self):
1515
# Assert that the text appears within a given element
1616
self.assert_text("Demo Page", "h1")
1717

18-
# Update the text of various text fields on the page
19-
self.update_text("#myTextInput", "This is Automated")
20-
self.update_text("textarea.area1", "Testing Time!\n")
21-
self.update_text('[name="preText2"]', "Typing Text!")
18+
# Type/update text in text fields on the page
19+
self.type("#myTextInput", "This is Automated")
20+
self.type("textarea.area1", "Testing Time!\n")
21+
self.type('[name="preText2"]', "Typing Text!")
2222

2323
# Verify that a hover dropdown link changes page text
2424
self.assert_text("Automation Practice", "h3")

0 commit comments

Comments
 (0)