selenium icon indicating copy to clipboard operation
selenium copied to clipboard

C# Protractor IEDriverServer Click() Exception “Timed out waiting for page to load” Javascript SignalR

Open thoaingan opened this issue 9 years ago • 1 comments

Meta -

OS: Windows 8.1 Selenium Version: 3.0.1 Browser: Internet Explorer Browser Version: 11.0.9600.18525

Expected Behavior -

element.Click() method should work

Actual Behavior -

element.Click() results in exception "Timed out waiting for page to load" regardless of how long the wait time is.

Steps to reproduce -

Unfortunately the particular pages I'm encountering this problem require a login, so I need management permissions to create an account that can be posted publicly. However, I hope my description of the issue can suffice.

I only run into this issue with some pages where Javascript SignalR is implemented. And this only happens with Selenium IE Driver. Chrome Driver works fine (have not tested with Firefox).

InterneExplorerOptions is defined as follows:

var ieOptions = new InternetExplorerOptions
{
    BrowserCommandLineArguments = "-private",
    EnableNativeEvents = false,
    IgnoreZoomLevel = true,
    IntroduceInstabilityByIgnoringProtectedModeSettings = false
};

browser.IgnoreSynchronization = true.

<script src="https://localhost:37121/signalr/poll?transport=longPolling&amp;connectionToken=AQAAANCMnd8BFdERjHoAwE%2FCl%2BsBAAAAUwalDb1qVUqsBmCLuURNHwAAAAACAAAAAAADZgAAwAAAABAAAADr9g2GQVKvK1pb%2FivxTu%2BBAAAAAASAAACgAAAAEAAAAB5eAALolT7EtoL1Y9C1xPooAAAA3TnUmbajNM9RIJ8oDRsPGLjavLcB2M10CyoJMXrnpv9H9XzB4bRVLBQAAABrEcirF0pjR5t%2Fst0mWJ0MnJYVlA%3D%3D&amp;messageId=d-9774B3D8-B%2C24%7CC%2C0%7CD%2C0%7CE%2C0&amp;connectionData=%5B%7B%22name%22%3A%22devicehub%22%7D%5D&amp;tid=8&amp;callback=jQuery21103819021041958953_1481549049341&amp;_=1481549049371" async=""></script>

thoaingan avatar Dec 13 '16 21:12 thoaingan

Techniques like long polling, which never allow the document's readyState to become "ready" will exhibit this behavior. Either set the page load strategy to not wait for this (set to 'none', for example), or implement a page load timeout and catch the exception.

jimevans avatar Mar 19 '17 00:03 jimevans