My test case:
- Open a browser and go to the URL.
- Click on the link on the main page → This will open a new window / new page tab.
- Return to the home page.
- Click another link.
- Make sure that the new content is displayed on the previously opened window of the child window / child from step 2.
I can check the number of open windows by getting the number of window descriptors and claim that it is 2 - so that when you click the second link, the contents are updated in one child window and another new window does not open.
If in case the links open in new tabs, how can I check this test case (a new tab opened the first time the link is clicked on the main page. When you click any links on the main page further, the content is updated to the same new tab)? Is there a way to count the number of tabs in a window?
Or does selenium make new tabs open instead of new windows?
source
share