Forum Discussion

sean_ng's avatar
sean_ng
Occasional Contributor
6 years ago
Solved

catch error then perform specific task

Hi,   during playback i get this error : There was an attempt to perform an action at point (X, Y) which is transparent or out of the window bounds.   i know what is causing this error : ...
  • tristaanogre's avatar
    6 years ago

    This is because the type of error raised is not a code exception but an operation exception with the "click" action.  These are not caught by try/catch.

     

    Suggestion.  In your code for doing the object click, before the click, do a check for VisibleOnScreen. If VisibleOnScreen is false, then call obj.scrollIntoView(true).  This will scroll the web page to the component before the click.