Selenium + Nose - N-1 Tests runs headless -
having strangeness go on.
from selenium import webdriver selenium.webdriver.common.keys import keys selenium.common.exceptions import timeoutexception selenium.webdriver.support.ui import webdriverwait selenium.webdriver.support import expected_conditions ec selenium.webdriver.common.by import selenium.webdriver.common.action_chains import actionchains driver = none class testthreshold: def __init__(self): self.driver = webdriver.chrome() def waitforid(self,type,id): try: element_present = ec.presence_of_element_located((type,id)) webdriverwait(self.driver, 10).until(element_present) except timeoutexception: print "timed out waiting page load" def setup(self): # code uses driver.login login def teardown(self): self.driver.close(); def test_login(self): # test assertion def test_feature(self): # test assertion def test_admin(self): # test assertion when run nosetests chrome browser pops up. stays on blank page bit, runs test_login , test_feature quits.
all 3 tests pass (got ran 3 tests in cli ok), 1 visually shown. 2 of 3 ran in headless type mode while page blank bit.
how can have run tests start finish without headless? (and if wanted to, how can run them both headless?)
i notice if keep adding tests, run n-1 tests headless (one ran visually)
so made me laugh. reason because there multiple chrome windows stacked on top of each other. running in parallel not sequentially.
wiki
Comments
Post a Comment