问题
I've been searching for a way to enable private browsing for Safari in the protractor conf file. I have gotten chrome to work with private browsing, with the below
chromeOptions: {
args: ["incognito", "disable-extensions"]
}
I havent found anything similar with Safari, if anyone can help that would be great.
Thanks.
回答1:
According to the WebDriver's documentation, what you are looking for is the
cleanSession property. It makes sure the session has no cookies, cache entries, local storage, or databases.
You can learn more here about Safari specific options.
来源:https://stackoverflow.com/questions/42350340/how-to-enable-private-browsing-for-safari-in-the-protractor-configuration