Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 unexpectedAlertBehaviour 设置为“忽略”,但只能找到 IEDriverServer 的 java 示例。
更喜欢Ruby示例。
不支持。见https://code.google.com/p/selenium/issues/detail?id=3392#c47;另请参阅:https ://code.google.com/p/chromedriver/issues/detail?id=537&q=unexpected&colspec=ID%20Status%20Pri%20Owner%20Summary
必要性要求我找出自己问题的答案
caps = Selenium::WebDriver::Remote::Capabilities.internet_explorer( :unexpectedAlertBehaviour => 'ignore' ) browser = Watir::Browser.new(:ie, :desired_capabilities => caps)
奇迹般有效。