Reputation: 33
Can anyone please help me how to open a URL in Chrome browser in Icognito mode, as the URL that i'm trying to open in chrome is giving 404 error but is opening successfully in Icognito. Please guide me what Robot command should be given to open in Icognito mode. Thank you.
Upvotes: 0
Views: 6315
Reputation: 23
This should work:
Open Browser | ${url} | Chrome | options=add_argument("--incognito")
Upvotes: 1
Reputation: 1062
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${options} add_argument incognito
Create WebDriver Chrome chrome_options=${options}
Go To https://www.google.com
Upvotes: 2
Reputation: 49
Robotframework always creates a 'clean' session of chrome so it shouldn't make a difference.
If you still want to run a incognito session, you could set --incognito option:
Open Browser ${url} Chrome options=addArguments("--incognito")
You can find what you can pass to the browser here: http://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Open%20Browser
Upvotes: -1