so I have set up my step definitions and cucumber scenarios and they r running fine using firefox (since my step def are using firefox webdriver) but now I need to run my scenarios crossbrowser. I have been looking at selenium grid as an option but would greatly appreciate if someone can guide me on how to run my cucumber scenarios crossbrowser. thanks
-
start using QMetry Automation Framework, [gherkin factory](https://qmetry.github.io/qaf/qaf-2.1.9/gherkin_client.html#benefits-of-using-qaf-gherkin-scenario-factory) and configure driver in xml configuration file – user861594 Oct 20 '16 at 08:32
2 Answers
When running WebDriver using any browser that is not Firefox you will need to use a third-party WebDriver.
Use the links Aravin has provided to download the WebDrivers.
You will also need to set a system property to where the third party driver files are located.
Here's an example of setting up a new ChromeDriver instance in Java:
System.setProperty("webdriver.chrome.driver", "path/to/chromedriver.exe");
WebDriver driver = new ChromeDriver();
IE:
System.setProperty("webdriver.ie.driver", "path/to/iedriver.exe");
WebDriver = new InternetExplorerDriver();
This should set you up a local instance for the above browsers.
If you are thinking of using grid, you can find plenty of info in the docs

- 47
- 2
- 11
You have to use the corresponding driver for the browser to execute your scenario.
For Chrome: https://code.google.com/p/selenium/wiki/ChromeDriver
For IE: https://code.google.com/p/selenium/wiki/InternetExplorerDriver
For Safari: https://code.google.com/p/selenium/wiki/SafariDriver
You can configure this in env.rb
file of your project.

- 6,605
- 5
- 42
- 58
-
Thanks for the comment... do you have any example of this implementation? I have developed my framework using Java, Selenium & Cucumber so how would I go about incorporating a ruby file? any example would be very helpful. thanks – hershey14 Jan 07 '16 at 17:18
-
I have found some info in ruby integration with my Java project (http://stackoverflow.com/questions/7404716/how-do-you-add-a-ruby-file-to-an-existing-project-in-eclipse-3-6-using-the-dynam) so I will give that a try for now :) ... thanks – hershey14 Jan 07 '16 at 17:26