嗨使用SendKeys函数后,我的网络驱动程序出现问题。使用SendKeys函数后C#Selenium Web驱动程序异常
我想要做的是在点击网页上的“保存”按钮后点击对话框上的确定按钮后,然后尝试获取新打开的页面的网址。
我的网络驱动程序使用SendKeys函数之前正常工作,因为我能够点击按钮,得到的URL等
我想这个问题可能是与网页做失去焦点点击后在对话中的OK按钮,所以我用下面的代码(但是这也不能工作): -
> System.Collections.ObjectModel.ReadOnlyCollection<string> winHandle2 =
> _webDriver.WindowHandles;
>
> _webDriver.SwitchTo().Window(winHandle[0]).SwitchTo();
例外我越来越可以看到下面: -
类型的异常“ System.Invalid OperationException'发生在WebDriver.dll中,但未在用户代码中处理 附加信息:[JavaScript错误:“a is null”{file:“file:/// C:/Users/andrew.short/AppData/Local/Temp /anonymous.3779fc41a91f475c89d01937ed7bb71b.webdriver-profile/extensions/[email protected]/components/command_processor.js“line:8166}]'[JavaScript Error:”a is null“{file:”file:/// C:/ Users \ andrew.short/AppData/Local/Temp/anonymous.3779fc41a91f475c89d01937ed7bb71b.webdriver-profile/extensions/[email protected]/components/command_processor.js“line:8166}]'when calling method:[nsICommandProcessor :: execute] 如果有这种异常的处理程序,程序可能会安全地继续。
我感谢所有帮助任何人都可以给我:-)
什么样的对话框?截图。在这里发布它的HTML。它使用了哪些插件? jQuery的?还有别的吗? – Arran 2014-09-04 07:14:28