Switch branches/tags
Nothing to show
Find file History
david1995 and SabotageAndi Updated SpecFlow+ Examples packages (#9)
* Updated Runner package version in AppVeyor_Support

* Updated Runner in CustomDeploymentSteps

* update custom deployment steps example

* Updated DeploymentTransformationMultipleThreads

* Updated NewCsprojFormat

* Updated Getting_Started

* Updated FilterExample

* Updated MultipleReports

* Updated GettingStarted_Msbuild

* update Getting Started with MSBuild

* update AppVeyor example

* update SeleniumGridWebTest example

* update SeleniumWebTest example

* update TestThreadIsolation example

* VSTest Unified Result example updated

* update WindowsAppDriver example

* update new csproj format

* update multiple reports example

* getting started updated

* filter example

* update deploymenttransformation multiple threads example

* update CustomDeploymentSteps example

* Updated AppVeyor_Support example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated CustomDeploymentSteps example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated DeploymentTransformationMultipleThreads example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated Filter example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated GettingStarted example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated GettingStarted_MSBuild example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated MultipleReports example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated SeleniumGridWebTest example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Fixed case typo in SeleniumWebTest readme

* Updated SeleniumWebTest example SpecFlow packages

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated remaining packages in SeleniumWebTest

* Updated TestThreadIsolation example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated TestThreadIsolation example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Updated WindowsAppDriver example

 - to SpecFlow 2.4 final
 - to SpecFlow+ Runner 1.8

* Added readme files to example solutions

 - AppVeyor_Support
 - Getting_Started
 - Getting_Started_MSBuild

* Updated appveyor.yml to use VS2017 image

* Fixed typo in directory name MultipleReports

* Updated NewCsprojFormat example

* Updated readme
Latest commit 4c70674 Aug 23, 2018

readme.md

Selenium 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/baseclass/Contrib.SpecFlow.Selenium.NUnit

This example also takes a screenshot after each step and embeds the screnshot in the final report. Refer to the documentation [here] (http://www.specflow.org/plus/documentation/Tutorial:-Customising-Reports) for an explanation of how the screenshot's path is passed to the report.

Important parts

app.config

In configuration/appSettings/browser the used browser is configured. This value is changed by a ConfigFileTransformation in the Default.srProfile

Default.srprofile

Targets

3 Targets (one for every browser) are defined here. They have a filter on the tag Browser_{BrowserName}, so only scenarios with the tag is executed in this target.

DeploymentSteps

2 deployment steps are configured

  1. IISExpress - this starts a IIS Express instance, so you do not have to check it manually that it is running
  2. ConfigFileTransformation - this sets the configuration/appSettings/browser to the target name

WebDriver.cs

This driver provides you access to the appropriate Selenium WebDriver. It uses the configuration/appSettings/browser value for this. To get access to the Selenium Web Driver, use the Current property on it. Use Context Injection to get the instance.

CalculatorFeature.feature

Here are the scenarios defined.
To get a scenario executed for a browser, add a tag Browser_{BrowserName} to the scenario/scenario outline/feature.

Example for a scenario for all 3 browsers:

@Browser_Chrome
@Browser_IE
@Browser_Firefox
Scenario: Basepage is Calculator
	Given I navigated to /
	Then browser title is Calculator