简体   繁体   中英

I can debug but unable to execute my Selenium C# script

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM