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 in Selenium by Nuri
276 views

1 answer to this question.

0 votes

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.quora.com')
answered Jul 31 by Anvi
• 13,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
3,768 views
0 votes
5 answers
0 votes
2 answers

How to get HTML Source of WebElement in Selenium WebDriver using Python?

You can read innerHTML attribute to get source of ...READ MORE

answered Jun 13, 2018 in Selenium by Samarpit
• 5,130 points
15,586 views
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,420 points
490 views
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer