Carpetfizz
Carpetfizz

Reputation: 9169

Python Selenium run multiple tests in one browser instance?

How can I run multiple tests from different modules in one browser instance in Selenium? For example, if I have a test to login, and another tests to do an action after logging in, can I string these tests together? So that the webdriver logs in first, then conducts the second test? I'm using Python 2.7.5 to write the tests.

Thanks!

~Carpetfizz

Upvotes: 2

Views: 1793

Answers (1)

Edu
Edu

Reputation: 2052

This depends on capabilities of your test runner. Nose test framefowrk allows you to define package level setup methods as well as module, class, and method setups.

Another method for manually providing the browser instance from another class is described in this answer to similar question.

Upvotes: 1

Related Questions