ERROR:cache_util_win.cc(21)] Unable to move the cache: Access is denied. (0x5)

0 votes

Aug 19, 2019 in Selenium by rrgeereddy
1,508 views

I got the same error....here is the code.

package newpackage;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

public class MyClass {

public static void main(String[] args) {

System.setProperty("webdriver.chrome.driver","C:/Program Files (x86)/Google/Chrome/Application/chrome.exe");

System.out.println(System.getProperty("webdriver.chrome.driver"));

WebDriver driver = new ChromeDriver();

String baseUrl = "http://demo.guru99.com/test/newtours/";

String expectedTitle = "Welcome: Mercury Tours";

String actualTitle = "";

driver.get("http://demo.guru99.com/test/newtours/");

actualTitle = driver.getTitle();

if (actualTitle.contentEquals(expectedTitle)){

System.out.println("Test Passed!");

} else {

System.out.println("Test Failed");

}

}

}

Try this:

System.setProperty("webdriver.chrome.driver","C:\\Program Files(x86)\\Google\\Chrome\\Application\\chrome.exe");

You're setting the chrome browser binary path, what you should set here is the chromedriver path. This should do!

1 answer to this question.

0 votes
@rrgeereddy, can you show how you are setting driver path in System.SetProperty() method. Please check whether you are using Chrome/Firefox/IE driver binary path or driver path. Please share your code's screenshot, the lines in which error are showing.
answered Aug 19, 2019 by Abha
• 27,920 points
System.setProperty("webdriver.chrome.driver",

"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");

I am using this one but still getting the same issue can you help me in that?
Hi @Akash! Can you please post the error logs?

Related Questions In Selenium

+1 vote
2 answers
+1 vote
0 answers

python selenium error: element is not attached to the page document

I am scraping Banggood, the problem is ...READ MORE

Apr 9 in Selenium by eslam
• 130 points
312 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Need Selenium to wait until the document is ready.

Use this: driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); This piece of code will ...READ MORE

answered Apr 20, 2018 in Selenium by king_kenny
• 3,710 points
4,348 views