Sep
24
2008
--

General run error when clicking on button

General run error are hard to debug and any extra information available to fix the issue is always helpful. Sometimes QTP starts throwing General run error in click events of WebButton. Digging into the source of the issue using the technique mentioned in Debugging General run error we would see a “Element not found” error in the debug pane.

When you check exist on the button it would still return True but the click would throw a general run error. I have not been to formalize what causes this issue but there is a small dirty workaround to fix

Browser("Browser").Page("Page").WebButton("Login").Highlight
Browser("Browser").Page("Page").WebButton("Login").Click

Note: You should only use this workaround in case you are getting a general run error. This should never be used as a practice

Rating: 7.1/10 (7 votes cast)