I want to use PAGE_LOAD_STRATEGY strategy while launching IE driver by using the following code but I'm facing a deprecation issue for InternetExplorerDriver. What's the reason for it?

DesiredCapabilities caps = new DesiredCapabilities();
    caps.setCapability(CapabilityType.PAGE_LOAD_STRATEGY, "none");
    WebDriver driver = new InternetExplorerDriver(caps);

InternetExplorerDriver is crossed out as indicated in the screenshot.


  • 1
    Did you read the docs or source for that class? If it's marked as deprecated, there's usually an explanation or alternative: seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/… – jonrsharpe Jul 28 '19 at 9:49
  • Yes, i did and it didnt work for me. how can i get rid of this deprecated issue ? how should i type the code to handle it – santino87 Jul 28 '19 at 12:59
  • What do you mean it didn't work? What did you change? What happened? – jonrsharpe Jul 28 '19 at 13:02

The docs say you have to instantiate the driver with a different argument type: InternetExplorerOptions:

enter image description here

InternetExplorerOptions have a method called setPageLoadStrategy:

InternetExplorerOptions options = new InternetExplorerOptions().setPageLoadStrategy(PageLoadStrategy.NONE);

You can find all strategies here.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.