I tried to run parallel execution while using Nunit for Specflow but n no of browsers are opening | Selenium Webdriver Tutorial with c# |Selenium C# training

Selenium C# Training Forum

I tried to run parallel execution while using Nunit for Specflow but n no of browsers are opening

V
Venkateswarlu Chunduri Post on 12/11/2018

Hi,

I am tried to run parallel execution on my location machine for Specflow feature files by using NUnit but n number of browsers are opening and due to this my system getting hanging. Is there any possible to limit the browser until 2 to 4.

Could you please help me on this? If you have any sample code then please share with me.

Regards,
Venkat

G

Instructor

gunjan Reply on 13/11/2018

Can you please share the code.

V
Venkateswarlu Chunduri Reply on 17/11/2018

Hi,

I implemented Specflow with POM framework along with NUNit and I declared driver as static but for parallel static won't support so I have removed static and trying to implement but getting null pointer exception.

Please find my code in below and let me know if you need any information. 

WebConnector.cs:
-----------------------

public IWebDriver _driver;

public WebConnetor(){
}




I have written different functions for Opening different browsers(IE,Mozilla & Chrome) and written some common functions(screenshots, wait,etc) and called in pages.

Login.cs
-------

public IWebDriver _driver;

public Login(IWebDriver _driver){
this._driver = _driver;
PageFactory.InitElements(_driver,this);

G

Instructor

gunjan Reply on 17/11/2018

Can you please share the zip file of the complete project. I can't see any implementation for parallel over here in the code.

V
Venkateswarlu Chunduri Reply on 27/11/2018

Hi,

I can't share my code because there is a restriction on my company.