Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHDocVw.InternetExplorer DocumentComplete blocked since Win10 update 1809 #3

Closed
toniarnold opened this issue May 6, 2019 · 1 comment

Comments

@toniarnold
Copy link
Owner

In theory, SHDocVw.InternetExplorer once required the Single-Threaded Aparment (STA), but this was no longer the case in the given context on Win10. Probably since Win10 update 1809 (retarded April 2019 version), even enforcing Apartment(ApartmentState.STA) (missing in .NET core) on the TestFixture causes the DocumentComplete event to time out after the second request – surprisingly, there is no difference whether the TestFixture nominally runs in the STA or the MTA.

Only workaround known today (tedious): A Visual Studio breakpoint at the end of IEExtensionBase.SetUpIE(), thus after each IE startup, precariously restores the old behavior and usually causes the tests to pass.

@toniarnold
Copy link
Owner Author

The empirical suspicion that vanishing COM/MTA/STA problems had something to do with the attached debugger was wrong: SHDocVw.InternetExplorer lately more aggressively grabs focus, and this now heavily interferes with programmatic control – the visual appearance of IE is ahead of its state visible to COM. Before update 1809, such problems sometimes arose when not refraining from touching the mouse, now they’re persistent, a true blocker.

New workaround: IE’s visible property now defaults to false, just like it originally was required on Win7. This can be overridden with SetUpIE(visible: true) in the test fixture for manual troubleshooting, but this requires to manually and immediately push IE into the background after starting up. Automatically opening a second IE over the testing one turned out to be unreliable, as the testing instance repetitively grabbed focus over the empty one again.

toniarnold added a commit that referenced this issue May 9, 2020
SHDocVw.InternetExplorer was always brittle and required the now per
default blocked 127.0.0.1 instead of localhost. With update 1909(?)
it even ignores the .Visible property, which re-triggers issue #3.

The new iselenium/iselenium.core extensions mirror the now deprecated
and unmaintainable iie/iie.core test API as closely as possible with
the NuGet Selenium.WebDriver.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant