Forum Discussion

shankar_r's avatar
Community Hero
8 years ago

Is there any way to check the Click action.

I'm getting error message as "There was an attempt to perform an action at a point, which is beyond the screen." while performing click action on a particular object.   Can i get return value or so...
  • tristaanogre's avatar
    8 years ago

    Turn your test case into a method with a return value of true or false based upon success of the test case... if test case 2 returns true, no need to close the window... if test case 2 returns false, you need to close the window.

    This is actually a pretty good methodology for any test case in a test automation environment... it allows you, eventually, to organize your test cases into larger batches where you can make the batch run/execute test cases based upon previous statuses.  

    For that matter, it's also a good idea that each test case should be as "atomic" as possible so they can be run without dependency.  If Test Case 3 is fragile enough to break because a previous test case left the application in a bad state, that means that test case 2 didn't have sufficient "tear down" code... nor did test case 3 have sufficient "set up" code.