How to use a specific chrome profile in selenium?

0 votes
Is there a way in chrome to use a specific profile such that the current profile doesn't get affected.

If yes, then can someone tell me the way of doing it?

Thank you in advance.
Dec 24, 2018 in Selenium by Anjali
• 2,950 points
13,368 views

1 answer to this question.

0 votes

User profiling is the term used for this and is a good practice of keeping the testing and general environment separate.

Yes this is available in chrome aswell.

You can create another profile for your chrome driver to access it.

ChromeOptions option = new ChromeOptions();
option.addArguments("user-data-dri=C:\\Users\\Your path to user\\Roaming\\Google\\Chrome\\User Data");
WebDriver driver = new ChromeDriver(option);

Hope this helps.

answered Dec 24, 2018 by Shuvodip
Thank you, this worked for me.

Related Questions In Selenium

0 votes
2 answers

How to use link as a locator to find element in selenium?

driver.findElement(By.linkText("link")).click(); READ MORE

answered Sep 3 in Selenium by Sri
• 2,970 points
329 views
0 votes
1 answer
0 votes
2 answers

How can we use JavaScript Executor to click and enter data to a web element in Selenium?

WebElement element = driver.findElement(By.id("abcd")); // Let the ...READ MORE

answered Mar 21 in Selenium by Lakshmi Sarvepalli
1,224 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,520 points
4,028 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,976 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,917 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
3,350 views
0 votes
7 answers

How to open a link in new tab of chrome browser using Selenium WebDriver?

Try this once driver.findElement(By.id("id")).sendKeys(Keys.CONT ...READ MORE

answered Sep 5 in Selenium by Sri
• 2,970 points
52,136 views
0 votes
1 answer