Issue with Chrome and ChromeDriver hanging using Selenium WebDriver 2.14.0.0 C# binaries

1469 views
Skip to first unread message

Scott M.

unread,
Jan 12, 2012, 7:35:12 PM1/12/12
to webdriver
Hi,

I have been stumped on an issue we have here for a few weeks now using
Chrome, ChromeDriver.exe and Selenium WebDriver.

The issue is that on our build machine my tests are being built by
TFS2010 (Visual Studio) and the test execution occurrs using TFS
calling NUNit which in turn calls my test binaries. This is all on
Win2008 using the C# binaries for selenium 2.

What is happening is when the test execution starts, I see the Chrome
and ChromeDriver 32bit exe's starting as well as the nunit-console.exe
and nunit-agent.exe processes on the build machine but then nothing
happens, no test failures are reported, no exceptions thrown
just....nothing. This is very perplexing as when I log onto the build
machine using the same credentials as that which the build process
runs under and I execute these manually through the nunit-console.exe,
the tests execute fine and they execute fine on my development machine
both using the nunit-console.exe and nunit GUI.

I have looked up on http://code.google.com/p/selenium/wiki/ChromeDriver
and tried setting the PATH Environment variable to the location of the
ChromeDriver.exe but the code still hangs.

My latest attempt at a workaround was to hardcode the ChromeDriver
path when I instantiate the ChromeDriver object and explicitly set the
user-data-dir in GetCapability(). But still no dice.

One note- with this configuration running the tests in FireFox and IE
work ok. I am hoping to use Chrome though due to some limitations the
other browsers present in our test and build environments which I
wont' get into here.

Here is the specs on everything:
ChromeDriver.exe - version - ChromeDriver_win_18.0.995.0 (note: I
have also tried to use versions 17.0.963 and 16.0.902 with no success)
Chrome Browser version - 16.0.912.75
Build Machine OS - Windows 2008 R2
Selenium/WebDriver binary version - 2.14.0.0
TFS2010
NUnit version 2.5.9.10348

Here is a sample of the parameters getting passed to Nunit from TFS to
start the test execution:
nunit-console.exe \\builder\Drop\TestAutomation
\Automation_20120112.3\BVT_Tests.dll /xml=BVT_Tests.dll.xml /
framework=4.0.30319

Any suggestions or help would be greatly appreciated. I'm going
insane trying to figure this out.

Here is the C# code I tried in my latest attempt to get the instance
of ChromeDriver working:

private IWebDriver _driver;

ICapabilities capabilities= DesiredCapabilities.Chrome();
capabilities.GetCapability("--user-data-dir=c:\\Users\\ARTaskUser\
\AppData\\Local\\Google\\Chrome\\User Data\\Default");

_driver = new ChromeDriver(@"C:\ChromeDriver\ChromeDriver_win_18",
capabilities);



regards,
S~

Scott M.

unread,
Feb 1, 2012, 8:08:22 PM2/1/12
to webdriver
More info on this issue:

I have updated my ChromeDriver to chromedriver_win_18.0.1022.0 this
morning as there is a new version here - http://code.google.com/p/chromium/downloads/list

I notice that there is now a chromedriver.txt file that is logging
data in my bin directory which at least shows me some data as to what
is happening.

After upgrading to the new version I still am getting the process
hangs I mentioned in the original thread. However in the
ChromeDriver.txt log file I see this information at the end of the
text file:

[21.729][FINER]: Waiting for all views to stop loading...
[21.729][FINER]: Done waiting for all views to stop loading
[21.729][FINER]: Waiting for all views to stop loading...
[21.729][FINER]: Done waiting for all views to stop loading
[21.729][FINE]: Command finished (/session/
c662919f3e4471f95dd91f66fc4ffc74/timeouts/implicit_wait) with response
{

"sessionId": "c662919f3e4471f95dd91f66fc4ffc74",

"status": 0,

"value": {

}

}


[382.888][FINE]: Command received (/session/
c662919f3e4471f95dd91f66fc4ffc74/refresh)
[382.888][FINER]: Waiting for all views to stop loading...


This data seems to vary. On another run the end of the log file is
showing this information:


[30.160][FINE]: Command received (/session/
431c7f18093d4e901d99b49a85e7471d/element) with params {

"using": "class name",

"value": "topNavnew_Vis"

}

[30.160][FINER]: Waiting for all views to stop loading...
[30.160][FINER]: Done waiting for all views to stop loading


I've rechecked my code and there is nothing that I can see that should
be causing the hang. And as stated before this only happens in our
automated build process using TFS after our bits have been compiled
and TFS launches Nunit and my test code and it appears to happen in
Chrome and the Chrome driver. I cannot repro this in Firefox.

As before when I run the test manually via the cmd prompt calling
nunit-console.exe or launching the tests in the Nunit GUI I cannot
repro.

Any ideas? Should I log this as a bug somewhere? Any help or
suggestions would be greatly appreciated.

thnks,
S~

On Jan 12, 4:35 pm, "Scott M." <scom...@gmail.com> wrote:
> Hi,
>
> I have been stumped on an issue we have here for a few weeks now using
> Chrome,ChromeDriver.exe and Selenium WebDriver.
>
> The issue is that on our build machine my tests are being built by
> TFS2010  (Visual Studio) and the test execution occurrs using TFS
> calling NUNit which in turn calls my test binaries.  This is all on
> Win2008 using the C# binaries for selenium 2.
>
> What is happening is when the test execution starts, I see the Chrome
> andChromeDriver32bit exe's starting as well as the nunit-console.exe
> and nunit-agent.exe processes on the build machine but then nothing
> happens, no test failures are reported, no exceptions thrown
> just....nothing.  This is very perplexing as when I log onto the build
> machine using the same credentials as that which the build process
> runs under and I execute these manually through the nunit-console.exe,
> the tests execute fine and they execute fine on my development machine
> both using the nunit-console.exe and nunit GUI.
>
> I have looked up onhttp://code.google.com/p/selenium/wiki/ChromeDriver
> and tried setting the PATH Environment variable to the location of theChromeDriver.exe but the code still hangs.
>
> My latest attempt at a workaround was to hardcode theChromeDriver
> path when I instantiate theChromeDriverobject and explicitly set the
> _driver = newChromeDriver(@"C:\ChromeDriver\ChromeDriver_win_18",
> capabilities);
>
> regards,
> S~

Jeremy Roelfs

unread,
Feb 21, 2018, 7:38:57 AM2/21/18
to webdriver
Scott,

Did you figure anything out on this issue? I am running in to the same thing. 

I thought it was a wait issue, but waiting for more than 15 minutes and my screen shot still shows a blank white page. This happens on my 1st and sometimes second tests. After that... every test runs fine. 

Using: C#/Selenium/NUnit/ChromeDriver with Headless

One thing. I only see this happening when I invoke the nunit3-consolerunner.exe on an EC2. But all tests run fine locally. It has to be a ChromeDriver thing. But I can't find a resolution. Did you find any answers?

Thanks!
Jeremy


PRIVILEGED AND CONFIDENTIAL -- All information transmitted hereby is intended for the use of the addressee(s) named above. If the reader of this message is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient(s), please note that any distribution or copying of this communication is strictly prohibited. Anyone who receives this communication in error should notify us immediately by telephone and destroy or delete the original message.
Reply all
Reply to author
Forward
0 new messages