Hi,
I am getting below error for PageLoadStrategy
Starting ChromeDriver 75.0.3770.90 (a6dcaf7e3ec6f70a194cc25e8149475c6590e025-refs/branch-heads/3770@{#1003}) on port 27507
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" org.openqa.selenium.InvalidArgumentException: invalid argument: 'pageLoadStrategy=eager' not yet supported
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'AA-PC', ip: '192.168.0.100', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_211'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
Ordinal0 [0x002E1B23+1448739]
Ordinal0 [0x00265A11+940561]
Ordinal0 [0x001F2293+467603]
Ordinal0 [0x00187A10+31248]
Ordinal0 [0x001A8A8B+166539]
Ordinal0 [0x001A88ED+166125]
Ordinal0 [0x001A6FFB+159739]
Ordinal0 [0x001909F6+68086]
Ordinal0 [0x00191990+72080]
Ordinal0 [0x00191929+71977]
GetHandleVerifier [0x00422E4C+1172140]
GetHandleVerifier [0x0037FE35+504469]
GetHandleVerifier [0x0037FBD0+503856]
Ordinal0 [0x002EC9A8+1493416]
GetHandleVerifier [0x0038060A+506474]
Ordinal0 [0x00277136+1012022]
Ordinal0 [0x00276FAF+1011631]
Ordinal0 [0x0028133B+1053499]
Ordinal0 [0x002814A3+1053859]
Ordinal0 [0x002804D5+1049813]
BaseThreadInitThunk [0x76BD33CA+18]
RtlInitializeExceptionChain [0x77D09ED2+99]
RtlInitializeExceptionChain [0x77D09EA5+54]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:157)
at rediff.main(rediff.java:15)
Code :-
ChromeOptions option= new ChromeOptions();
option.setPageLoadStrategy(PageLoadStrategy.EAGER);
Instructor
Ashish Thakur Replied on 03/07/2019
Please ignore the Eager strategy as the browser is currently not supporting this strategy. You can use other strategies. till then.
So is Eager supported in any other browsers or is it deprecated?
Instructor
Ashish Thakur Replied on 05/07/2019
Eager is supported in other browsers, Chrome at this point is not supporting this.