Selenium ChromeDriver (C#) Crashes Only in Visual Studio Debug Mode -


i facing issue running selenium tests written in c# in visual studio.

the issue have when run tests on chromedriver studio in debug mode, chrome window crashes frowny face.

enter image description here

the chromedriver command window shows following error in loop (~20 times).

starting chromedriver 2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf) on port 52376 local connections allowed. [28356:19528:0922/134628:error:child_process_launcher.cc(528)] failed launch child process 

this trace get:

at openqa.selenium.remote.httpcommandexecutor.createresponse(webrequest request)  @ openqa.selenium.remote.httpcommandexecutor.execute(command commandtoexecute)  @ openqa.selenium.remote.driverservicecommandexecutor.execute(command commandtoexecute)  @ openqa.selenium.remote.remotewebdriver.execute(string drivercommandtoexecute, dictionary`2 parameters)  @ openqa.selenium.remote.remotewebdriver.startsession(icapabilities desiredcapabilities)  @ openqa.selenium.remote.remotewebdriver..ctor(icommandexecutor commandexecutor, icapabilities desiredcapabilities)  @ openqa.selenium.chrome.chromedriver..ctor(chromedriverservice service, chromeoptions options) 

the best part when run test directly explorer (outside studio), works fine.

i use test runner built else. not sure runner using.

ide: visual studio enterprise 2015 update 3

chrome driver version: 2.24.417431

bottomline: want able run selenium tests studio (in debug mode) itself. can please me out here?

i have observed if chrome driver version not compatible chrome browser version, chrome driver (before v2.28) throwing errors while manipulating browser (i.e. maximize, resize etc.)

solution 1:
use version 2.28 has fixed bug blocked chromedriver automation extension loading , thereby causing window resizing/positioning & screenshot functionalities break. (note chromedriver 2.28 supports chrome v55-57)

solution 2:
if chrome driver not updated v2.28: use appropriate chromium command line switch (ex. chromeoptions.addarguments("--start-maximized");) manipulate browser , remove line driver.manage().window().maximize(); if any.

mark +1 if answer useful you.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -