我正在从 WATIR 2.0.4 升级到 3.1.0。在执行之前尝试“杀死弹出窗口”时遇到以下错误。我能做些什么来解决这个问题?
视窗
红宝石 1.9.3
黄瓜 1.1.9
Watir-经典 3.1.0
(in OLE method `execScript': )
OLE error code:80020101 in <Unknown>
Could not complete the operation due to error 80020101.
HRESULT error code:0x80020009
Exception occurred. (WIN32OLERuntimeError)
29
30Then /^I kill the popups$/ do
31 @browser.execute_script "window.confirm = function() { return true; }"
32 @browser.execute_script "window.alert = function() { return true; }"
33 @browser.execute_script "window.prompt = function() { return true; }"