Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit bc75408

Browse files
committed
Merge branch 'sf24'
2 parents eff8cfb + 433c9d7 commit bc75408

File tree

54 files changed

+2673
-646
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2673
-646
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ SpecFlow plugin for WebDriver instances generation. Write your tests easily
1616
- Ability to run features in [parralel](https://github.com/techtalk/SpecFlow/wiki/Parallel-Execution) with [NUnit3](https://github.com/nunit/docs/wiki/Parallelizable-Attribute)
1717
- Support of [BrowserStack](browserstack.com/), [SauceLabs](https://saucelabs.com/), [TestingBot](https://testingbot.com), [CrossBrowserTesting](https://crossbrowsertesting.com/) with required RestApi methods and keys.
1818
- Scenario annotation with ***Key:Value*** syntax
19+
- Custom WebDriver configuration
1920

2021
[![N|Solid](https://raw.githubusercontent.com/unickq/SpecFlow.Selenium.Plugin/master/Example.png)]()
2122

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<configuration>
4+
5+
<configSections>
6+
<section name="autofac" type="Autofac.Configuration.SectionHandler, Autofac.Configuration" />
7+
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
8+
</configSections>
9+
10+
<specFlow>
11+
<unitTestProvider name="Unickq.SpecFlow.Selenium.Allure" />
12+
<generator allowDebugGeneratedFiles="true" markFeaturesParallelizable="true" />
13+
<plugins>
14+
<add name="Unickq.SpecFlow.Selenium.Allure" path=".\bin\Debug" />
15+
<add name="Unickq.SpecFlow.Selenium" path=".\bin\Debug" />
16+
</plugins>
17+
</specFlow>
18+
19+
<appSettings>
20+
<add key="testingbot.key" value="YOUR_DATA_HERE" />
21+
<add key="testingbot.secret" value="YOUR_DATA_HERE" />
22+
<add key="saucelabs.username" value="YOUR_DATA_HERE" />
23+
<add key="saucelabs.accessKey" value="YOUR_DATA_HERE" />
24+
<add key="cbt.user" value="YOUR_DATA_HERE" />
25+
<add key="cbt.key" value="YOUR_DATA_HERE" />
26+
</appSettings>
27+
28+
<autofac>
29+
<components>
30+
<component name="ChromeDebug"
31+
type="Unickq.SpecFlow.Selenium.Local.ChromeDriver, Unickq.SpecFlow.Selenium.SpecFlowPlugin"
32+
service="OpenQA.Selenium.IWebDriver, WebDriver" instance-scope="per-dependency">
33+
<parameters>
34+
<parameter name="capabilities">
35+
<dictionary>
36+
<item key="arguments" value="--window-size=1024,1024" />
37+
<!-- <item key="mobileEmulation" value="iPhone 6" />-->
38+
<item key="userProfilePreference1" value="intl.accept_languages=nl" />
39+
<item key="userProfilePreference2" value="download.default_directory=D:\workspace" />
40+
</dictionary>
41+
</parameter>
42+
</parameters>
43+
</component>
44+
45+
<component name="FirefoxDebug"
46+
type="Unickq.SpecFlow.Selenium.Local.FirefoxDriver, Unickq.SpecFlow.Selenium.SpecFlowPlugin"
47+
service="OpenQA.Selenium.IWebDriver, WebDriver" instance-scope="per-dependency">
48+
<parameters>
49+
<parameter name="capabilities">
50+
<dictionary>
51+
<item key="AcceptUntrustedCertificates" value="true" />
52+
<!-- <item key="Binary" value="C:\Program Files (x86)\Mozilla Firefox\firefox.exe" /> -->
53+
</dictionary>
54+
</parameter>
55+
</parameters>
56+
</component>
57+
58+
<component name="RemoteChrome"
59+
type="Unickq.SpecFlow.Selenium.WebDriverGrid.RemoteWebDriver, Unickq.SpecFlow.Selenium.SpecFlowPlugin"
60+
service="OpenQA.Selenium.IWebDriver, WebDriver" instance-scope="per-dependency">
61+
<parameters>
62+
<parameter name="url" value="http://localhost:4444/wd/hub" />
63+
<parameter name="browser" value="Chrome" />
64+
<parameter name="capabilities">
65+
<dictionary>
66+
<item key="YOUR CAP" value="CAP Value" />
67+
</dictionary>
68+
</parameter>
69+
</parameters>
70+
</component>
71+
72+
<component name="CrossbrowserTesting"
73+
type="Unickq.SpecFlow.Selenium.WebDriverGrid.CrossBrowserTestingWebDriver, Unickq.SpecFlow.Selenium.SpecFlowPlugin"
74+
service="OpenQA.Selenium.IWebDriver, WebDriver" instance-scope="per-dependency">
75+
<parameters>
76+
<parameter name="browser" value="Chrome" />
77+
<parameter name="capabilities">
78+
<dictionary>
79+
<item key="platform" value="Windows 7" />
80+
</dictionary>
81+
</parameter>
82+
</parameters>
83+
</component>
84+
85+
<component name="BrowserStack_Win10_Chrome"
86+
type="Unickq.SpecFlow.Selenium.WebDriverGrid.BrowserStackWebDriver, Unickq.SpecFlow.Selenium.SpecFlowPlugin"
87+
service="OpenQA.Selenium.IWebDriver, WebDriver" instance-scope="per-dependency">
88+
<parameters>
89+
<parameter name="browser" value="Chrome" />
90+
<parameter name="capabilities">
91+
<dictionary>
92+
<item key="os" value="Windows" />
93+
<item key="os_version" value="10" />
94+
</dictionary>
95+
</parameter>
96+
</parameters>
97+
</component>
98+
99+
<component name="TestingBot_ElCapitan_Safari"
100+
type="Unickq.SpecFlow.Selenium.WebDriverGrid.TestingBotWebDriver, Unickq.SpecFlow.Selenium.SpecFlowPlugin"
101+
service="OpenQA.Selenium.IWebDriver, WebDriver" instance-scope="per-dependency">
102+
<parameters>
103+
<parameter name="browser" value="Safari" />
104+
<parameter name="capabilities">
105+
<dictionary>
106+
<item key="platform" value="CAPITAN" />
107+
<item key="version" value="9" />
108+
</dictionary>
109+
</parameter>
110+
</parameters>
111+
</component>
112+
113+
<component name="SauceLabs_Win7_Firefox"
114+
type="Unickq.SpecFlow.Selenium.WebDriverGrid.SauceLabsWebDriver, Unickq.Specflow.Selenium.SpecFlowPlugin"
115+
service="OpenQA.Selenium.IWebDriver, WebDriver" instance-scope="per-dependency">
116+
<parameters>
117+
<parameter name="browser" value="Firefox" />
118+
<parameter name="capabilities">
119+
<dictionary>
120+
<item key="platform" value="Windows 7" />
121+
</dictionary>
122+
</parameter>
123+
</parameters>
124+
</component>
125+
</components>
126+
</autofac>
127+
<startup>
128+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
129+
</startup>
130+
<runtime>
131+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
132+
<dependentAssembly>
133+
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
134+
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
135+
</dependentAssembly>
136+
<dependentAssembly>
137+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
138+
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
139+
</dependentAssembly>
140+
<dependentAssembly>
141+
<assemblyIdentity name="nunit.framework" publicKeyToken="2638cd05610744eb" culture="neutral" />
142+
<bindingRedirect oldVersion="0.0.0.0-3.10.1.0" newVersion="3.10.1.0" />
143+
</dependentAssembly>
144+
<dependentAssembly>
145+
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
146+
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
147+
</dependentAssembly>
148+
</assemblyBinding>
149+
</runtime>
150+
151+
</configuration>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Feature: F1
2+
3+
#@Browser:RemoteChrome
4+
#@Browser:Cbt_Win10_Chrome
5+
#@GoogleTranslate:DEe
6+
@Browser:BrowserStack_Win10_Chrome
7+
#@Browser:TestingBot_ElCapitan_Safari
8+
#@Browser:SauceLabs_Win7_Firefox
9+
#@GoogleTranslate:FR
10+
#@GoogleTranslate:DE
11+
@
12+
@Browser:ChromeDebug
13+
@GoogleTranslate:UK
14+
@Authoer:QWE
15+
Scenario Outline: Check website title
16+
Given I have opened <URL>
17+
Then the title should contain '<string>'
18+
Examples:
19+
| URL | string |
20+
| https://translate.google.com/ | Google |
21+
#| https://translate.google.com | Google |

Unickq.SpecFlow.Selenium.Allure.Example/Features/F1.feature.cs

Lines changed: 114 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Feature: f2
2+
As Dasdsadsa
3+
sadas
4+
asd
5+
sad
6+
sa
7+
das
8+
d
9+
as
10+
11+
#@Browser:Chrome_local
12+
#@Browser:Chrome_local2
13+
#@Browser:Firefox_local
14+
#@Browser:BrowserStack_Win10_Chrome
15+
#@Browser:Cbt_Win10_Chrome
16+
#@Browser:TestingBot_ElCapitan_Safari
17+
#@Browser:SauceLabs_Win7_Firefox
18+
#@Browser:BrowserStack_Win10_Chrome
19+
#@Browser:ChromeDebugs
20+
@Browser:ChromeDebug
21+
@GoogleTranslate:DE
22+
@GoogleTranslate:UA
23+
Scenario Outline: Check website title
24+
Given I have opened https://translate.google.com/
25+
Then the title should contain '<string>'
26+
Examples:
27+
| string |
28+
| Gwoogle |

0 commit comments

Comments
 (0)