capsolver-browser-extension icon indicating copy to clipboard operation
capsolver-browser-extension copied to clipboard

Can not add Extension in Java Selenium

Open tranmanh098 opened this issue 1 year ago • 2 comments

//My code //Do I need to deposit money into my account first to use the API key ? public class ChromeWithPlugin { public static void main(String[] args) {

    ChromeOptions options = new ChromeOptions();
    options.addExtensions(new File("lib\\CapSolverExtension.crx"));
 // Thiết lập cho chrome
	options.setBinary("lib\\chrome-win64\\chrome.exe");

//options.addArguments("--headless");.

    WebDriver driver = new ChromeDriver(options);
    driver.get("https://google.com");
    System.out.println();
}

}

tranmanh098 avatar Mar 20 '24 17:03 tranmanh098

This is problem log: Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: cannot process extension #1 from unknown error: cannot read manifest

tranmanh098 avatar Mar 20 '24 17:03 tranmanh098

try to use zip version of folder

sergio-itru avatar Apr 27 '24 01:04 sergio-itru