Chrome/ChromeDriver hangs when test automation is started via TFS

827 views
Skip to first unread message

Scott M.

unread,
Jan 26, 2012, 6:20:56 PM1/26/12
to Selenium Users

Hello,
I am having issues trying to complete test automation runs using
Google Chrome. I'm hoping someone here can offer a suggestion or
solution to my issue.

We are running the following on our build machine:

Selenium version 2.14.0.0 using the .Net binaries (the tests are
written in C#)
Nunit version 2.5.9.10348
Windows Server 2008 R2
Chrome version 16.0.912.77
ChromeDriver.exe version 18.0.995.0 (windows version)
Microsoft Team Foundation Server 2010 – version 10.0.30319

We have our TFS build process kick off a new automated BVT run when a
new build is completed and TFS passes the following to Nunit - c:
\Program Files (x86)\NUnit 2.5.9\bin\net-2.0\nunit-console.exe \\build
\Drop\QAtest\QAtest_20120112.5\BVT_1Tests.dll /xml=BVT_1Tests.dll.xml /
framework=4.0.30319

The problem we are running into is that I see the Chrome, Chromedriver
and Nunit processes running in Windows Task Manager on our build
machine but those processes seem to hang and they hang indefinitely.
I get no exceptions thrown and no test logs are written to glean any
information from in regards to what is going on.

When I run this at the command prompt on the build machine manually (c:
\Program Files (x86)\NUnit 2.5.9\bin\net-2.0\nunit-console.exe \\build
\Drop\QAtest\QAtest_20120112.5\BVT_1Tests.dll /xml=BVT_1Tests.dll.xml /
framework=4.0.30319) the tests execute and complete. Also results are
displayed in the test log.
The tests also execute fine on my development machine in both the
Nunit console and when I run them via the Nunit GUI.

I am at a loss as to what is causing this. We added more RAM to our
build machine a couple days ago to fix some other perf issues the
machine has been having but my automated Selenium tests are still
hanging and were prior to the addition of more RAM. Firefox seems to
run just fine in the automated process. And again running the tests
using Chrome manually via Nunit at the command prompt or via the Nunit
gui does not repro the issue.

The code I am using to create the Chrome WebDriver object is below and
verified that Chrome exists in the C:\ChromeDriver\ChromeDriver_win_18
folder and have verified that the default folder exists and contains
files for this path - c:\\Users\\userAlias\\AppData\\Local\\Google\
\Chrome\\User Data\\Default. I have also set the environment
variables on the machine to point to C:\ChromeDriver
\ChromeDriver_win_18 with no success:
private IWebDriver _driver;

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

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

I have been truly baffled for a few weeks now and any suggestions or
help is appreciated.

S~




Scott M.

unread,
Feb 3, 2012, 4:37:07 PM2/3/12
to Selenium Users
I upgraded to the latest ChromeDriver this week which has enabled
logging. Chrome or the chromedriver still hang only during our
automated build and test process and the code I suspect this is
hanging on is this:

Assert.IsNotNull(driver.FindElement(By.ClassName("topNavnewat_Vis"),
intWebDriverWaitTime));
driver.Url=strEnvironment;

The log file from ChromeDriver contains this data at the end:

[23.058][FINE]: Command received (/session/
d2fb2f532097e3b8649a5d45314b43dd/element) with params {

"using": "class name",

"value": "topNavnewat_Vis"
}

[23.058][FINER]: Waiting for all views to stop loading...
[23.058][FINER]: Done waiting for all views to stop loading
[83.339][FINE]: Command received (/session/
d2fb2f532097e3b8649a5d45314b43dd/url) with params {

"url": "http://build.ourbuildmachine.com/Default.aspx"

}


[83.339][FINER]: Waiting for all views to stop loading...
[144.495][FINE]: Command received (/session/
d2fb2f532097e3b8649a5d45314b43dd/timeouts/implicit_wait) with params {

"ms": 59000.0

}


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

Anyone have any suggestions?

Scott M.

unread,
Feb 3, 2012, 7:36:02 PM2/3/12
to Selenium Users
Ok, I added a bunch of logging in the test code and pinned the hang
issue to the very last line of code in my webdriver wait extension
below:

var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
element = wait.Until(drv => drv.FindElement(by));

I still don't understand why this is an issue only when our automated
build process runs the code and not while I manually run it via the
gui or the Nunit console. The element search is being conducted via
By.ClassName("topNavnewat_Vis").

Scott~

Scott M.

unread,
Feb 14, 2012, 7:35:49 PM2/14/12
to Selenium Users
I have configured TFS to run interactively so I can now view the
Chrome screen on the build server as the test runs.

I am getting a 'Aw, Snap!' screen when trying to execute this line:
driver.Url="http://build.ourbuildmachine.com/Default.aspx";

As I said before this only happens in our automated build/test process
and not when I manually kick off a test run.

I have upgraded the browser on the build machine to Chrome 17.0.963.46
and Chrome Driver to 18.0.1022.0 since my original post above but am
still running into this. I have also gone as far as moved over to
MSTest instead of Nunit as my test runner and this is still
problematic.

I have also tried the following:
1. Created a new user profile under the account the tests run under
in Chrome as stated here - http://support.google.com/chrome/bin/answer.py?hl=en&answer=95669
2. Changed the test url to another site like www.google.com but to no
avail
3. Tried to get more debugging info but ran into this -
http://groups.google.com/group/selenium-users/browse_thread/thread/4dab49f7e7b63a29/6604016e37fff535?lnk=gst&q=Chrome+logging#6604016e37fff535
4. Poured over this user group looking for similiar issues but
nothing remote related.
5. Tried to check for a crash dump and tried to get more info on the
crash by typing in 'chrome:crashes' but to no avail.

Has anyone encountered this? Is there a workaround or a suggestion on
what I may try next? Anyone?

kanchana d

unread,
Aug 22, 2017, 12:26:25 AM8/22/17
to Selenium Users
Hi Scott,
Do you still have this issue?
Reply all
Reply to author
Forward
0 new messages