Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protractor combined with SpecFlow, Selenium and C#

I have been searching the internet for hours, but cannot really find a good answer for my situation. Currently, I have my tests setup in SpecFlow and C#. Basically, what I always like to do is, keep all parameters outside of the code. (So basically: Given I go to 'http://www.stackoverflow.com' instead of Given I go to BaseURL)

Now as the new web application I want to test is built in AngularJS, I was advised to use protractor. My technical knowledge is quite limited, but the thing I want to ask you all is:

Is it possible to use protractor combined with SpecFlow and thus possible to send parameters from SpecFlow into my code? Is it possible to use protractor without the command prompt but with NUnit Test Adapter? If it is possible, is there any easy to follow tutorial for this?

Thanks in advance!

Anand

like image 820
Anand Avatar asked Apr 29 '16 08:04

Anand


1 Answers

Here is a great article from Anthony Chu that might help. There is a NuGet package for a .Net version of protractor that's built on top of Selenium. I've tried it and it works well with both nunit or SpecRunner. The C# version of protractor lets you use the same angular specific selectors that you get from protractor but runs it on top of the Chrome WebDriver.

Article from Chu , Protractor .Net.

Good Luck!

like image 165
DerrickF Avatar answered Oct 22 '22 07:10

DerrickF