Execute two separate test cases in the same browser instance using TestNG xml file

0 votes
I have two testcases in two separate java classes, 1. login and 2. add new item. I want to execute both as separate testcases under the same browser instance. Ideally one browser window will open, and execute the login testcase. After login, the second testcases will continue to execute under the same browser. I am currently using TestNG xml file to run these tests. Following is the <classes> tag within xml file that contains both classes.

<classes>

<class name="com.SeleniumFramework.testCases.TC_Login" />

<class name="com.SeleniumFramework.testCases.TC_AddItem" />

</classes>
Jul 23 in Selenium by Jimmy
• 130 points
186 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to run a group of test cases using TestNG in Selenium Webdriver?

Hey Kajal, TestNG allows you to perform ordered ...READ MORE

answered Jun 12 in Selenium by Abha
• 27,180 points
201 views
0 votes
1 answer
0 votes
1 answer

Maximizing the browser window in Selenium WebDriver using C#

Check this first: http://code.google.com/p/selenium/issues/detail?id=174 You Can use the JavascriptExector as follows: public ...READ MORE

answered May 2, 2018 in Selenium by Samarpit
• 5,150 points
94 views
0 votes
1 answer

Can we control the test execution speed in WebDriver (using Ruby)

The methods controlling execution speed in WebDriver ...READ MORE

answered May 30, 2018 in Selenium by king_kenny
• 3,650 points
366 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
1,147 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,150 points
1,246 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,150 points
1,002 views