I built a Chrome-extension, and I would like to make an automatic Selenium test, in order to test it.
This is the code I wrote in java:
public static void main(String[] args) throws InterruptedException {
WebDriver Driver = null;
System.setProperty("webdriver.chrome.driver","chromedriver.exe");
Driver = new ChromeDriver();
ChromeOptions options = new ChromeOptions();
options.addExtensions(new File("EXTENSTION-TRY_v1.crx"));
DesiredCapabilities cap = DesiredCapabilities.chrome();
cap.setCapability(options.CAPABILITY, options);
Driver = new ChromeDriver(cap);
//Driver.get("chrome-
extension://gnenabaciggjinojhciofkkiphbmcinf/home.html");
But everytime I ran it, I get this error:
Requests to the server have been blocked by an extension. Try disabling your extensions. ERR_BLOCKED_BY_CLIENT
AdBlock is disabled. Do you know how can I solve this issue?
Thank you