Issue
I've tried to use this one to solve this problem, but it doesn't disable javascript setting in the Microsoft Edge browser. Could someone help with this? Thanks!
EdgeOptions options = new EdgeOptions();
options.setCapability("javascript.enabled", false);
Solution
This code might be of some help:
prefs.put("profile.default_content_setting_values.javascript", 2);
EdgeOptions options = new EdgeOptions();
options.setExperimentalOption("prefs", prefs);
WebDriver driver = new EdgeDriver(options);
driver.get("site url");
Answered By - Kendrick Li
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.