How to open a new window on a browser using Selenium WebDriver for python?

0 votes
I am attempting to open a new tab OR a new window in a browser using selenium for python. It is of little importance if a new tab or new window is opened, it is only important that a second instance of the browser is opened.

I tried several different methods but none have succeeded.
Aug 23, 2018 in Selenium by ghost
• 1,790 points

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 can try the below code:

driver = webdriver.Firefox() #First FF window
second_driver = webdriver.Firefox() #The new window you wanted to open

Depending on which window you want to interact with, you send commands accordingly

print driver.title #to interact with the first driver
print second_driver.title #to interact with the second driver
answered Aug 23, 2018 by Meci Matt
• 9,400 points

Related Questions In Selenium

0 votes
1 answer

How to open a browser window in full screen using Selenium WebDriver with C#

Simply Use this: driver.Manage().Window.Maximize(); READ MORE

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

I tried to open a new website when a new tab is opened using Selenium Webdriver

Try this code: ArrayList<String> tabs = new ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,030 points
0 votes
2 answers

Is it possible to scroll down in a webpage using selenium webdriver programmed on python?

I using next code for facebook for ...READ MORE

answered 6 days ago in Selenium by
0 votes
1 answer
0 votes
1 answer

How to Hover using Mouse in python using Webdriver

from selenium.webdriver.common.action_chains import ActionChains def hover(self): ...READ MORE

answered Aug 8, 2018 in Selenium by Meci Matt
• 9,400 points
0 votes
1 answer

How can we use Selenium with Python?

First  Install Python based on the Operating ...READ MORE

answered May 7, 2018 in Selenium by Meci Matt
• 9,400 points
0 votes
5 answers
0 votes
1 answer

How to I switch to a new window for links with “blank” targets using Capybara?

Capybara 2.3 includes the new window management ...READ MORE

answered Jul 11, 2018 in Selenium by Meci Matt
• 9,400 points

© 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.