Closed nimicohgr closed 8 years ago
Alright, I may have figured it out. I am importing close_driver now and calling it between tests.
This new code works as I expect:
from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webelement import WebElement
from webium.controls.link import Link
from webium.driver import get_driver, close_driver
from webium import BasePage, Find, Finds
class GooglePage(BasePage):
url = 'http://www.google.com'
def test_one():
home_page = GooglePage()
home_page.open()
close_driver()
def test_two():
home_page = GooglePage()
home_page.open()
get_driver().quit()
test_one()
test_two()
We have a need to restart the browser after certain tests. However, after get_driver().quit() is called, Webium will not automatically create the driver itself in the following test. The simplest example I could come up with that reproduces the behavior can be found below. I'm not certain if this is a webium issue, or just a usage issue on my part. Any suggestions as to achieve the desired behavior would be greatly appreciated.