Execute script for all browser | Selenium Forum
N
Ninad Shivaji Kambli Posted on 27/07/2019

How can we execute script for all browser?

Suppose we have 50 test cases in a suite and I configured them in TestNG. I have maintained browser variable in Property file and there I mention for which browser i have to execute all 50 tests. 

After execution of all 50 tests I have to manually change browser variable and again re-run all test scripts. Rather can't I mention all browser in my initial setp up and all 50 test will be executed in all browsers


A
Ashish Thakur Replied on 29/07/2019

Which module you're referring to?


N
Ninad Shivaji Kambli Replied on 04/08/2019

This is an question asked in interview. Possible answer could be we should create suite files as per browser. Mention all these suites file in single testng.xml file and execute that file.

Is the above correct approach ? or do you have any better approach? 


A
Ashish Thakur Replied on 06/08/2019

Please watch HybridFramework for this. You'll get to know how you can dynamically choose the browser for a particular set of data in a test.