0

On my test machine, I am able so start my test, but after several internet explorer windows get opened and closed by the test, no more new windwos are opened. I get no error mesage and the test is stuck.

I checked every single setting according to the selenium wiki.

If I use the chromedriver to run the tests in chrome, everything runs smooth.

The code used looks like this:

var { Builder, By, Key, until, Capabilities } = require("selenium-webdriver");
var ieCapabilities = Capabilities.ie();
var driver = await new Builder().withCapabilities(ieCapabilities).build();
await driver.manage().setTimeouts({ implicit: 3000, pageLoad: 3000, script: 3000 })
await driver.manage().window().setRect({ height: this.initialHeight, width: this.initialWidth });
await driver.get("http://localhost/");
// do the tests
await driver.quit();

The code is run inside an ava test. To avoid problems, I temporarely set concurrency to 1 and made all tests serial, but the problem occurs still.

How do I make the test run to the end?

Adrian Dymorz
  • 875
  • 8
  • 25

1 Answers1

0

There have been several problems which caused the tests to hang:

Timeouts for wait-calls

Because of things behaving a bit different in IE, the missing timouts caused the tests to hang.

Wrong code:

await driver.wait(until.stalenessOf(elementSelectMenu));

Correct code:

await driver.wait(until.stalenessOf(elementSelectMenu), 6000);

Missing await statements

This has never been a problem in firefox or chorme, but caused IE to crash.

Code which caused troubles:

driver.findElement([...]).click();

Correct code:

await driver.findElement([...]).click();

Troubles using selenium on TLS (https) websites

Some tests had to check things on a websites using TLS. On IE, the tests threw an error.

Workaround was to disabled protected mode for all zones.

Adrian Dymorz
  • 875
  • 8
  • 25