question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Internet Explorer automation crashes when a long test is run that interacts multiple webpages

See original GitHub issue

Meta -

OS: Windows 10 Selenium Version: 3.9.0 (IEDriverServer.exe) Browser: Internet Explorer 11

selenium-webdriver (npm): 4.0.0-alpha.1 Node: 8.10.0

Browser Version: 11.909.15063.0 (64-bit)

Expected Behavior -

I should be able to run a long test that interacts with multiple pages without my test crashing.

Actual Behavior -

Webdriver (or Internet Explorer?) crashes when repeatedly loading and interacting with pages with Internet Explorer. This is NOT the only condition under which this bug occurs. It seems that issuing too many Webdriver commands with at least some driver.get() commands mixed in will reliably cause the crash. I consider this to be a SERIOUS BUG because it seems that it can break ANY long test against IE that interacts with more than one page.

The following does NOT seem to cause the crash:

  • A long test that never changes pages or reloads the current page
  • Only calling driver.get() without interacting with the page

The crash can take a variety of forms. Typically it happens after running for 10-20 minutes and will produce one of the following errors.

  • Sometimes the browser page will go white and can no longer be interacted with, causing webdriver to error: TimeoutError: Timed out waiting for page to load.
  • Sometimes the browser page will appear to load, but webdriver will report that an element clearly visible on the page cannot be interacted with: NoSuchElementError: Unable to find element with css selector == *[id="q"]
  • Sometimes Internet Explorer crashes completely, causing the standard Windows error window when a program stops responding: Internet Explorer has stopped working. A problem caused the program to stop working correctly. Please close the program.

Steps to reproduce -

Execute this code and let the loop repeat for approximately 10-20 minutes. For your convenience I put this code with a package.json and complete setup instructions in this git repo.


(async function example() {
	let browser = await new Builder()
		.forBrowser('internet explorer')
		.build();
	let startTime = new Date().getTime();
	let currentTime;
	let numLoops = 0;

	while(true) {
		currentTime = new Date().getTime();
		numLoops++;
		process.stdout.write(`\rReloads: ${numLoops}, elapsed time: ${getElapsedTimeString(startTime, currentTime)}        `);
		await browser.get('https://google.com');
		await browser.findElement(By.name('q')).sendKeys('This will crash soon');
	}
})();

function getElapsedTimeString(startTime, endTime) {
	let elapsedSeconds = Math.floor((endTime - startTime) / 1000);

	let date = new Date(null);
	date.setSeconds(elapsedSeconds);
	return date.toISOString().substr(11, 8);
}```

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
apurba31commented, Nov 1, 2018

I am running tests using version 3.12, and here as well the driver stops working. As long as its a single test, it works fine. But as the number of tests increases it stops. I am running a regression suite and I have to run multiple suits at a time, this behavior beats the purpose of regression!

1reaction
ben-yocumcommented, Apr 16, 2018

3.11.1 (32 bit): Crashed after 9 minutes. TimeoutError: Timed out witing for page to load. 3.11.1 (64 bit): Still has the 64-bit slow-typing issue. Did not proceed with test.

I also tried some older versions.

3.4.0 (32 bit): Successful run, no sign of defect. I killed it manually after 40 minutes. 3.7.0 (32 bit): Success. 3.8.0 (32 bit): Success.

The defect is not present until 3.9.0.

Edit: Hang on, I’m getting some different results from other tests. Disregard this comment for the moment.

Edit 2: I ran the same tests, but against a different website (not Google). All versions of IEDriverServer show the bug on this site. See my following comment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Internet Explorer crashes when you run an application on a ...
Fixes an issue in which you run an application on a webpage that uses inner tabs in Internet Explorer 11, Internet Explorer 10,...
Read more >
22 Reasons Why Test Automation Fails For Your Web App
We are listing 22 reasons why test automation fails for a web application to help you rectify your web automated testing process.
Read more >
9 Ways to Get Chrome to Stop Crashing - Nira
Chrome is normally a very stable browser, but sometimes you'll get a frustrating run of crashes. We'll walk you through how to find...
Read more >
Why Your Website Looks So Bad on Internet Explorer
As we know, your web page will have slight differences across browsers because of the different ways they render HTML, CSS, and JavaScript....
Read more >
Setting up your own test automation environment
Selenium is the most popular browser automation tool. ... There is also nothing to stop you running the test on multiple browsers ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found