Reusing browser session across multiple test cases

154 views
Skip to first unread message

Ambika Kuppusamy

unread,
May 23, 2013, 7:39:10 AM5/23/13
to seleniu...@googlegroups.com
Hi All,

I am using Junit 4 and Selenium webdriver in my automation process. I have multiple test cases (more than 100)  and each test case requires login functionality.

I want to run all the test cases in the same browser window and maintain the login session instead of opening the new browser for each test case and do login everytime. (In my current scripts, am initiating webdriver in each test script and it opens a new window for each test case and do login every time)

I want to run a test suite, in which i want to run all my test cases in the same browser window. Please provide me a solution.

Thanks in advance,
Ambika.

Tarun Kumar

unread,
May 24, 2013, 3:08:20 AM5/24/13
to seleniu...@googlegroups.com
Though I would suggest against running all tests in one browser, you could set up test to be run with @*Suite (If on testng) annotation. 
Reply all
Reply to author
Forward
0 new messages