Jan 13, 2021 8:29:16 AM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "...\chromedriver.exe" (in directory "."): CreateProcess error=5, Access is denied)
When I attempt to run Selenium Webdriver on my Windows 10 machine using Maven, Google Chrome Browser and Java, I come across this message. I have checked the permissions and everything appears to be set up correctly:
What could be causing this Access denied issue?
EDIT: So that I can re-open this question, the above linked questions do NOT answer my problem, my problem is related to error code 5, Access Denied. (the linked questions appear to be related to Error code 1) Here's my code to prove my statement:
psf Logger logger = LogManager.getLogger(BrowserRunTime.class);
logger.info("*** Chrome Simulation(): default viewport");
String exePath = System.getProperty(USER_DIR) + "\\src\\main\\resources\\chromedriver.exe";
System.setProperty("webdriver.chrome.driver", exePath);
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--start-maximized");
WebDriver driver = new ChromeDriver(chromeOptions);
driver.get(browserMeta.getProperties().getProperty(DESKTOP_URL));
WebDriverWait wait = new WebDriverWait(driver, 10);