Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.36 KB

File metadata and controls

31 lines (20 loc) · 1.36 KB

Selenium Gird Web Test Example

This is a example how to use SpecFlow and SpecFlow+Runner to run Selenium Web Tests for different Browsers.
The example is based on https://github.com/techtalk/SpecFlow.Plus.Examples/tree/master/SeleniumWebTest

Prerequisites

To run this example, you need a running Selenium Grid. For installing, configuring and running have a look at: https://github.com/SeleniumHQ/selenium/wiki/Grid2

Info about Parallelisation and Browser

Chrome

everything works

Firefox

should work

Internet Explorer

On the same pc, you will not get any gain, because as it looks like, IEDriverServer does not handle multi instances of IE very performant. (Status from 2016-09-13) Execute the tests on multiple nodes.

Important parts

app.config

In configuration/appSettings/seleniumHub the used selenium grid is configured.

WebDriver.cs

This driver provides you access to the appropriate Selenium WebDriver. It uses the configuration/appSettings/browser value for this. As we are using Selenium Grid, a RemoteWebDriver with appropriate DesiredCapabilities is needed. This driver is configures with the configuration/appSettings/seleniumHub Uri for the grid. To get access to the Selenium Web Driver, use the Current property on it. Use Context Injection to get the instance.