[英]How to handle basic url authentication using selenium in Safari browser
driver.get("https://username:password@something.com");
driver.get("https://username:password@something.com);
and then:进而:
driver.get("http://something.com");
In safari both of the above solutions are not working.在 safari 中,上述两种解决方案都不起作用。 I have also tried with Alert class in selenium.我也尝试过使用硒中的警报类。 Googled a lot, still did not find any solution working.谷歌搜索了很多,仍然没有找到任何有效的解决方案。 Any solution which can be used across all browsers would be awesome ;), solution for safari alone is also fine.任何可以在所有浏览器上使用的解决方案都很棒;),单独的 safari 解决方案也很好。 Thanks in advance.提前致谢。
Neither of these approaches is expected to work;预计这些方法都不会奏效; browsers have stopped accepting user:password for Basic Authentication, so it doesn't work under WebDriver control either.浏览器已停止接受用户:密码进行基本身份验证,因此它也无法在 WebDriver 控制下工作。 The WebDriver Working Group is aware of this functionality gap but hasn't proposed a solution yet :( WebDriver 工作组意识到了这个功能差距,但尚未提出解决方案:(
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.