Forum Discussion
Most windows will also support the "Close()" method or something similar. Examine the window in Object Spy and see if there is a close method associated with it. That's what I would attempt to use on a fail... you'd need that anyway in the event handler... but I don't think the event handler is what you should use for this situation.
Dear tristaanogre,
Thankyou, even I have used the same thing in my routine.
For example: Close button test , if I click on the close button and satisfied the conditon it's fine but incase it not satisfies then I can't use the obj.Close() options right.
Rough Code:
if action == '"close":
if not obj.Exists:
Log.CheckPoint()
else:
Log.Error()
obj.Close() ## Here I can't use the same option which I am checking right ?
elif action == "no"
if not obj.Exists:
.......................
..............................
..........
Did you get my point now ?
thanks and Regards
SivaKartheek Sreeram
- tristaanogre6 years agoEsteemed Contributor
Yup, got the point... my answer does not change. I think you're handling this the best you can.
- sivakarthik6 years agoContributor
Thanks any way for the info. I got an another idea regarding the issue. i.e If that conditions fails I am stooping the test case not doing the tests further.
thanks and regards
SivaKartheek Sreeram
- tristaanogre6 years agoEsteemed Contributor
sivakarthik wrote:
Thanks any way for the info. I got an another idea regarding the issue. i.e If that conditions fails I am stooping the test case not doing the tests further.
thanks and regards
SivaKartheek Sreeram
That's actually a valid solution... generally, does the rest of the test case make sense to continue if a fundamental step fails? IMO, I usually do the same... Doesn't make sense to continue a test of an earlier condition fails as it could make any other results invalid.
Glad to help!
Related Content
Recent Discussions
- 4 hours agoashly