How to open browser window in incognito private mode using python selenium webdriver

0 votes
How to open browser window in incognito/private mode using python selenium webdriver?
Jul 31, 2019 in Selenium by Nuri
13,690 views

1 answer to this question.

+1 vote

Hi Nuri, to open a browser window in Incognito or Private mode, you have to use Chrome Options to add incognito in the arguments of the webdriver. Following example shows how to open chrome browser in incognito mode:

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--incognito")

driver = webdriver.Chrome('C:\\Users\\Anvi_R\\Downloads\\chromedriver.exe',chrome_options=chrome_options)

driver.implicitly_wait(2)
driver.maximize_window()

driver.get('https://www.edureka.co')


Hope this will help!

To learn more, go for Python Master course today.

Thank!

answered Jul 31, 2019 by Anvi
• 14,150 points
TQ :)

IT WORKED FOR ME

Related Questions In Selenium

0 votes
2 answers

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

Hi , we have inbuilt method Maximize(). driver.Manage().Wind ...READ MORE

answered Sep 6, 2020 in Selenium by Sri
• 3,190 points
16,033 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
2 answers
0 votes
2 answers
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,460 points
2,432 views
+1 vote
2 answers

Python with Selenium issue: “Chrome is being controlled by automated test software”

from selenium import webdriver chrome_options = webdriver.ChromeOptions() chrome_options.add_experimental_option("useAutomationExtension", False) chrome_options.add_experimental_option("excludeSwitches",["enable-automation"]) driver ...READ MORE

answered Apr 20, 2020 in Selenium by Manoj
15,896 views
0 votes
1 answer

How to open Firefox window in Incognito mode using Selenium Webdriver?

Hi Pritha, you can use this code ...READ MORE

answered May 14, 2019 in Selenium by Anvi
• 14,150 points
7,099 views
0 votes
1 answer

How can I refresh a browser window in different ways using Selenium Webdriver?

Hello Piyush, you can refresh a browser ...READ MORE

answered May 29, 2019 in Selenium by Anvi
• 14,150 points
3,237 views
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