Skip to content

Commit

Permalink
Try a more reliable test target.
Browse files Browse the repository at this point in the history
Ideally we set up a test server and test against that. However,
we want a real world example so we test against wiktionary instead.
Google has started barring scrapers.
  • Loading branch information
jeffFranklin committed Aug 23, 2019
1 parent a72c91d commit 1da07cd
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions webdriver_recorder/test_webdriver_recorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,13 @@
import time

def test_basic(browser):
browser.get('https://google.com')
browser.get('https://en.wiktionary.org')
time.sleep(1)
browser.snap()
browser.send('keyboard cat\n')
browser.wait_for('a', 'keyboard cat')
browser.click('a', 'images')
assert len(browser.pngs) == 3


def test_xdist(browser):
"""pytest-xdist will run many tests in parallel. Test that."""
browser.get('https://google.com')
time.sleep(1)
browser.snap()
browser.send('kool aid man\n')
browser.wait_for('a', 'kool aid man')
browser.click('a', 'images')
browser.send_inputs('boundless')
browser.send('\n')
browser.wait_for('h1', 'boundless')
browser.click('a', 'unbounded')
assert len(browser.pngs) == 3


Expand Down

0 comments on commit 1da07cd

Please sign in to comment.