Leave site pop up is getting displayed if I use stop test item on error.
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Leave site pop up is getting displayed if I use stop test item on error.
Hi,
I am trying to execute 10 test cases and I am using approach 1 which was mentioned in below link.
When object is not find for one test case I am trying to stop that test case and continue with remaining.
But following pop up is getting displayed.(Capture.png)
Becuase of this remaining test cases not excuting.
Do I need to write script for handling this pop up also or am I missing something?
Could you please some one explain how to stop test item on error.
Thanks in advance.
Regards,
Saritha
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Think about manual test cases. When you start a test case, you expect your application and environment to be in a particular state. So, before you start your test case, you make sure you get your environment in that state. Likewise, when you finish the test case, you clean up the environment, closing applications and so forth.
The same is the case with automated test cases. What it sounds like is that there are "tear down" processes that need to be run when a test case stops.... so, yes, you do need to code for it. Since, however, this is a web application, what I would suggest is what we do at the start of every test case... we kill any running browsers and start fresh with any "setup" code...the idea is that each test case is autonomous and can run independantly of any other,
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you please explain me with the code? I am trying to kill the running browser but not getting.
Thanks in advance.
Regards,
saritha.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For help with your code, it would be useful for you to share it here.
However, here is the method we use for our own "tear down".
function closeIEInstance() { var counter = 0; var browser; browser = Sys.WaitBrowser('iexplore', 1000); while((browser.Exists) && (counter < 60)){ counter++; browser.Terminate(); browser = Sys.WaitBrowser('iexplore', 1000); } }
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the code.
Could you please tell me Where I need to call this method? Please find attachment for test case strucuture.(Capture 1.png)
In login method I have below steps:
1. Navigate to URL
2. Enter username
3. Enter password.
4. Click on submit
In logout method I have below steps:
If any modal open first close that modal and click on logout.
Now while executing if error comes where i need to call this method for terminating browser?
Thanks in Advance,
Regards,
Sairtha.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would actually include that code within the Login.... that before you login, you first terminate all browsers then run the browser.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you tristaanogre.
I kept in Login method, before logging am killing the instance of the browser.
It's working fine.
Thanks.
Regards,
Saritha.
