How to enable private browsing for Safari in the Protractor configuration

痞子三分冷 提交于 2019-12-13 07:05:01

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!