[CentralOH] pytest and selenium

John Cassidy jocassid at gmail.com
Fri Dec 23 17:06:31 EST 2016

After I sent my email, I stumbled upon the answer to my question


has an example of fixtures depending on fixtures.  I wound up with a
loggedIn fixture that looks like this:

def loggedIn(request, driver, baseUrl):
    driver.get(baseUrl + '/login.aspx')
    return "home" == driver.title

driver and baseUrl are my existing fixtures.  A typical test looks
something like:

def testSomething(driver, baseUrl, loggedIn):
    assert loggedIn  # makes sure that login happened
    # other selenium commands and assert statements
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20161223/8f92bb13/attachment.html>

More information about the CentralOH mailing list