This is an attempt to explain the feature of selenium webdriver and TestNG.
Generally we will run a single test case or script at a time. If you want to run a single test on different browsers it is possible with selenium webdriver and TestNG. Test will be executed parallel in two browsers.
Lets see..how we can achieve this
Prerequisites:
Sample Script:
Create a sample webdriver script using TestNG and in that script define a parameter using @Parameter annotation.
Below is the sample script:
Create TestNG:
Create a testNG.xml file to run your script. Parameter value we can pass it from here.
Below is the sample TestNG.xml file
Run your TestNG.xml file and three browsers will open and script will run on 3 browsers parallel.
Generally we will run a single test case or script at a time. If you want to run a single test on different browsers it is possible with selenium webdriver and TestNG. Test will be executed parallel in two browsers.
Lets see..how we can achieve this
Prerequisites:
Sample Script:
Create a sample webdriver script using TestNG and in that script define a parameter using @Parameter annotation.
Below is the sample script:
Create TestNG:
Create a testNG.xml file to run your script. Parameter value we can pass it from here.
Below is the sample TestNG.xml file
Run your TestNG.xml file and three browsers will open and script will run on 3 browsers parallel.
It is Awesome. :)
ReplyDeleteSelenium is really an excellent tool and your information related to selenium recording is really interesting. Also I want to know the latest new techniques which are implemented in selenium. Can you please update it in your website?
ReplyDeleteSelenium training Chennai
Latest technology have created a greater impact over testing web applications. This vital in identifying important issues that raises in web appplications. Thanks for sharing this information in here. Keep blogging article like this.
ReplyDeleteSelenium training in chennai
nice post..
ReplyDeleteselenium training in chennai
wow great one
ReplyDeleteOnline Selenium Training | Selenium Training Institute in Chennai | Best Selenium Training Center in chennai | Best Automation Testing Training in Chennai