我可以调试但无法执行我的 Selenium C# 脚本
如果我调试我的代码,它会成功地逐行运行。但是当我在没有断点的情况下运行时,它显示以下错误并且我的脚本失败。
“失败的 PaymentGateway ProjectFunctions 测试方法 Project_Automation.Functions.PaymentGateway 抛出异常:Selenium.SeleniumException:错误:出现意外警报![Sys.WebForms.PageRequestManagerServerErrorException:在服务器上处理请求时发生未知错误。从返回的状态代码服务器是:0]。”
浏览器在 UI 中没有显示错误。但错误控制台显示“错误:设置只有 getter 的属性”,
它显示在单个 for 循环的末尾。我无法执行其余的循环
If i debug my code its running line by line successfully. but when i run without breakpoints it shows the following error and my script failed.
"Failed PaymentGateway ProjectFunctions Test method Project_Automation.Functions.PaymentGateway threw exception: Selenium.SeleniumException: ERROR: There was an unexpected Alert! [Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0]."
Browser shows no error in UI. but Error console shows "Error: setting a property that has only a getter"
It shows at the end of a single for loop. i am unable to execute rest of the loops
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来调试器窗口之一中的属性评估有副作用。有时会发生这种情况,尝试在 VS 中关闭此设置来消除这种情况:
工具 ->选项->调试->启用属性评估和其他隐式函数调用
Sounds like the property evaluation in one of the debugger windows has a side effect. This happens sometimes, try to turn this setting off in VS to eliminate this:
Tools -> Options -> Debugging -> Enabled property evaluation and other implicit function calls