I have a quite old website to be maintained, supports IE8 and above.
Now I've a plan to do some test automation on the site, using Selenium WebDriver (version 3.7.1). Almost everything works well, except for some pages that use document.getElementById(). The point is, these pages utilize the "feature" of IE11 that when no element matches with specified ID, it then returns the element with that ID as name (as denoted in this thread).
And when brower (IE11) started by selenium, it fails to invoke that code (return a NULL, causing error).
Further investigate, I found that, when launched manually, invoking navigator.appName returns "Microsoft Internet Explorer", while returns "Netscape" in the other case.
What does that difference mean, and is that the root cause of my problem. And most important, how to resolve that?
I'm launching the page with this source code:
DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
WebDriver driver = new InternetExplorerDriver(
new InternetExplorerOptions(ieCapabilities));
wait = new WebDriverWait(driver, 30);
driver.get(url);