I have a scenario that clicks a button that performs a few redirects before landing on the intended page.
The issue is that these redirects get blocked within the Chromedriver session that is opened when the button is clicked.
Is there some sort of setting I can set for the Chromedriver so every time the script is run, the redirects don't get blocked?
Chrome version: 74.0.3729.157
Code tried :
options.addArguments("--disable-popup-blocking");
This as far as i'm aware will only disable the popup blocking, not redirects? I've also tried within the session manually preventing the blocking of the redirects, but the next time i run the scenario the redirects are blocked again
You can disable Safe Browsing in Chrome Settings:
Settings > Sync and Google services > Other Google services > Safe browsing
Or, try with this option
options.addArguments("--disable-web-security");
Try to add below to the driver, it works for me
ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-web-security");
WebDriver driver = new ChromeDriver(options);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With