Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @pytest.fixture
- def driver(request):
- # remote webdriver connection is fine
- browser = webdriver.Remote(remote_url, desired_capabilities=chromeOpts)
- yield browser
- browser.quit()
- def pytest_runtest_protocol(item, nextitem, driver):
- reports = runtestprotocol(item, nextitem=nextitem)
- for report in reports:
- if report.when == 'call':
- driver.execute_script('sauce:job-result={}'.format(report.outcome))
- return True
- def test_browser(driver):
- # does some browser actions
Add Comment
Please, Sign In to add comment