Skip to content

Update examples #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/basic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ def test_basic(self):
self.open("https://xkcd.com/353/")
self.click('a[rel="license"]')
self.open("https://xkcd.com/1481/")
self.click("link=Blag")
self.update_text("input#s", "Robots!\n")
self.click("link=Store")
self.update_text("input#top-search-input", "xkcd book\n")
self.open("https://xkcd.com/1319/")
12 changes: 0 additions & 12 deletions examples/get_ip_with_bing.py

This file was deleted.

9 changes: 5 additions & 4 deletions examples/master_qa/basic_masterqa_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class MasterQATests(MasterQA):
def test_masterqa(self):
self.open("https://xkcd.com/1700/")
self.verify("Do you see a webcomic?")
self.highlight_click('link=Blag')
self.verify('Do you see a blog archive?')
self.highlight_update_text("input#s", "Dragons\n")
self.verify('Do you see "dragons" in the search results?')
self.highlight_click("link=Store")
self.highlight_click('[title="things for walls"]')
self.verify('Do you see posters for sale?')
self.highlight_update_text("input.search-input", "book\n")
self.verify('Do you see books in the search results?')
6 changes: 3 additions & 3 deletions examples/master_qa/masterqa_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def test_xkcd(self):
self.verify("Can you find the moon?")
self.click('a[rel="next"]')
self.verify("Do the drones look safe?")
self.click_link_text('Blag')
self.update_text("input#s", "Robots!\n")
self.verify("Does it say 'Hooray robots' on the page?")
self.click_link_text('Store')
self.update_text("input.search-input", "book\n")
self.verify("Do you see books in the search results?")
self.open("https://xkcd.com/213/")
for i in range(5):
self.click('a[rel="prev"]')
Expand Down
8 changes: 4 additions & 4 deletions examples/my_first_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ def test_basic(self):
self.open("https://xkcd.com/1481/")
title = self.get_attribute("#comic img", "title")
self.assert_true("86,400 seconds per day" in title)
self.click("link=Blag")
self.assert_text("The blag of the webcomic", "h2")
self.update_text("input#s", "Robots!\n")
self.assert_text("Hooray robots!", "#content")
self.click("link=Store")
self.assert_element('[alt="The xkcd store"]')
self.update_text("input.search-input", "xkcd book\n")
self.assert_text("xkcd: volume 0", "h3")
self.open("https://xkcd.com/1319/")
self.assert_exact_text("Automation", "#ctitle")

Expand Down
5 changes: 2 additions & 3 deletions examples/proxy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ class MyTestClass(BaseCase):
def test_proxy(self):
self.open('https://ipinfo.io/')
ip_address = self.get_text("div.home-ip-details span.value")[1:-1]
self.open('https://ipinfo.io/%s' % ip_address)
print("\n\nIP Address = %s\n" % ip_address)
print("\n\nMy IP Address = %s\n" % ip_address)
print("Displaying Host Info:")
print(self.get_text('ul.address-list'))
print(self.get_text('div.home-ip-details').split('asn: ')[0])
print("\nThe browser will close automatically in 7 seconds...")
time.sleep(7)
8 changes: 4 additions & 4 deletions integrations/node_js/my_first_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def test_basic(self):
self.open("https://xkcd.com/1481/")
title = self.get_attribute("#comic img", "title")
self.assert_true("86,400 seconds per day" in title)
self.click("link=Blag")
self.assert_text("The blag of the webcomic", "h2")
self.update_text("input#s", "Robots!\n")
self.assert_text("Hooray robots!", "#content")
self.click("link=Store")
self.assert_element('[alt="The xkcd store"]')
self.update_text("input.search-input", "xkcd book\n")
self.assert_text("xkcd: volume 0", "h3")
self.open("https://xkcd.com/1319/")
self.assert_exact_text("Automation", "#ctitle")
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ urllib3==1.25.3
requests>=2.22.0
selenium==3.141.0
pluggy>=0.12.0
pytest>=4.6.4;python_version<"3"
pytest>=4.6.5;python_version<"3"
pytest>=5.0.1;python_version>="3"
pytest-cov>=2.7.1
pytest-forked>=1.0.2
Expand Down
9 changes: 5 additions & 4 deletions seleniumbase/console_scripts/sb_mkdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ def main():
" title = self.get_attribute(\"#comic img\", \"title\")")
data.append(
" self.assert_true(\"86,400 seconds per day\" in title)")
data.append(' self.click("link=Blag")')
data.append(' self.click("link=Store")')
data.append(
' self.assert_text("The blag of the webcomic", "h2")')
data.append(' self.update_text("input#s", "Robots!\\n")')
data.append(' self.assert_text("Hooray robots!", "#content")')
" self.assert_element('[alt=\"The xkcd store\"]')")
data.append(
' self.update_text("input.search-input", "xkcd book\\n")')
data.append(' self.assert_text("xkcd: volume 0", "h3")')
data.append(' self.open("https://xkcd.com/1319/")')
data.append(' self.assert_exact_text("Automation", "#ctitle")')
data.append("")
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setup(
name='seleniumbase',
version='1.27.0',
version='1.27.1',
description='Fast, Easy, and Reliable Browser Automation & Testing.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down Expand Up @@ -65,7 +65,7 @@
'requests>=2.22.0',
'selenium==3.141.0',
'pluggy>=0.12.0',
'pytest>=4.6.4', # Keep at >=4.6.4 for Python 2 compatibility
'pytest>=4.6.5', # Keep at >=4.6.5 for Python 2 compatibility
'pytest-cov>=2.7.1',
'pytest-forked>=1.0.2',
'pytest-html==1.20.0', # Keep at 1.20.0 (later versions have errors)
Expand Down