0

We are using Selenium WebDriver and Cucumber for our Acceptance testing. We have a collection of Features that we want to test, each with multiple scenarios, here is an example:

 Scenario Outline: Unsuccessful login with W3ID credentials Given I navigate to the Bluecost Spreadsheet Upload Web url and receive a login screen When I login using invalid credentials: "<user_id>" and "<user_pwd>" Then the W3ID will reject my credentials, produce an error message and I will not proceed to BCSUW Examples: | user_id | user_pwd | | baduserid | badpass | 

I want to test each one of these Scenarios with each browser that we need to support: FireFox, Edge, and Chrome. How do I run those Features and Scenarios for each one of those 3 browsers?

4
  • Do I have to write each scenario with a 'browser_type' variable that I supply on each scenario instance? Or is there another way? Commented Aug 28, 2018 at 15:09
  • You should be able to pass 'browser_type' as a variable to the method that instantiates your driver and run the same scenario. if (browser_type.equals("firefox")) { //make instantiate driver for firefox} and similarly other browsers. Commented Aug 28, 2018 at 15:28
  • Yes, so it means that I have to repeat the same scenario for each browser type in the "Examples" section. Was hoping there was another way. Commented Aug 28, 2018 at 17:15
  • For Selenium Webdriver you do not have to have Feature file however for the BDD like cucumber you can look at similar question here stackoverflow.com/questions/43446922/… Commented Aug 28, 2018 at 17:28

1 Answer 1

1

I've read the post link above and one of the answers suits me: I'm going to execute all the Features/Scenarios for every browser under test. This may mean running the test 3 times through: Firefox, Chrome and Edge.

Thanks for the link PJAutomator

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.