Forum Discussion
Best practice would be to open the browser for the test and close it when it's finished. Is there some reason you need to leave it open?
The reason the browser is open is because I just want to test if I am able to click on the link or not and also to check if it navigate to the correct tab. So in my code I have two link that i need to click
function testclicklink()
{
Click(linkx);
Click(linky);
}
if i open new browser and run this function, then it working, but if I was on different tab and want navigate to linkx and linky then it failed to find the object.
Some time it click on (linkx) and it can't find (linky), but some time it failed both.
- Marsha_R7 years agoChampion Level 3
Tab navigation isn't part of your application though, right? A user could have a hundred tabs open and they are going to pick the one with your app open and then start using it. That's not your functionality so you don't need that in your test.
For your testing, you want as few things open as possible in order to minimize the effects on your application. It sounds like your test works just fine if you limit the browser properly.
Related Content
- 7 years agojameshnb
- 2 years agoemily_m
- 7 months agoddima
- 5 years agoNikitaPyatakov