I have a scenario in which I am trying to test if clicking a link opens up a new tab and that page which is opened on a new tab has certain elements present.
This is a simple scenario and works fine on Chrome but on Firefox when I run the same test case instead of opening the link in a new tab it opens a new window. This doesn’t happen when I repeat the same scenario manually on firefox.
I want to handle this condition so I was thinking if I can add an if statement in the script to see if the test is running on firefox then it should check for a new window rather than a tab.
I am not sure what to do withing the script to see if it is a Firefox or Google Chrome test case is running.