Ejemplo n.º 1
0
 def setUpClass(cls):
     try:
         # Run the live server.
         cls.app.live(kill_port=True)
     except Exception as e:
         # Skip test if not started.
         raise unittest.SkipTest(e)
     
     # Start browser.
     cls.browser = sample_apps.get_browser()
     cls.browser.implicitly_wait(3)
Ejemplo n.º 2
0
def browser(request):
    liveandletdie.port_in_use(PORT, True)

    browser = sample_apps.get_browser()
    browser.implicitly_wait(3)

    def finalizer():
        browser.quit()
        sample_apps.teardown()

    request.addfinalizer(finalizer)
    return browser
Ejemplo n.º 3
0
def setup_browser():
    print("starting browser")
    world.browser = sample_apps.get_browser()
    world.browser.implicitly_wait(3)