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
26,761 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 4, 2020 in Selenium by Sri
• 3,190 points
1,756 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 22, 2020 in Selenium by Lakshmi Sarvepalli
3,479 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,500 points
13,673 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

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

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,142 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,910 points
7,221 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 3, 2020 in Selenium by Sri
• 3,190 points
7,874 views
0 votes
8 answers

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

This below code works for me in ...READ MORE

answered Dec 14, 2020 in Selenium by Gitika
• 65,770 points
103,024 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP