Selenium ChromeDriver opens only the default chrome page

0 votes

I have recently been working with Selenium WebDriver. I am also working specifically with the ChromeDriver. Whenever I try to open a new chrome window (driver.get(URL)), Chrome starts the process in the default state, instead of opening on the current window from my dock (I am on a macbook running OS X Yosemite). Is there a way around this? Or is this just a set behavior?

Mar 5 in Selenium by Surya
• 780 points
23 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You will see a default profile unless you specify which profile to use. To configure this in order to view the normal profile, navigate to chrome://version in a new tab. Your profile path is visible, and you can enter any specified option, by removing the "/Default" from the end of your path if any. Here's an example (this is for Windows, but the same code would work for Mac, just change the path)

    System.out.println("Now opening Chrome in my profile");
    ChromeOptions options = new ChromeOptions();
    options.addArguments("userdir=C:/Users/[your user name]/AppData/Local/Google/Chrome/User Data");

    driver = new ChromeDriver(options);
    driver.get("URL");
answered Mar 5 by Vaishnavi
• 720 points

Related Questions In Selenium

0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

How to scroll the Page up or down in Selenium WebDriver? (using java)

Its pretty simple. Check out the below ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,030 points
4,293 views
0 votes
1 answer
0 votes
1 answer

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,030 points
51 views
0 votes
1 answer
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,130 points
412 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
40 views
0 votes
1 answer

How to auto-refresh the ChromeDriver using Selenium Webdriver?

You can use this command. Also, refresh ...READ MORE

answered May 10 in Selenium by Vaishnavi
• 720 points

edited May 10 by Omkar 15 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.