How to verify whether new tab opened or not in selenium webdriver? -


I have a situation where I have to check whether a new tab has been opened after clicking on the link. If the tab opens then I also want to see the title.

Does anyone have any information about it?

Here is the same for C #; It has been tested and it will work whether the link opens in a new tab or a new window. var browsertab = driver Windhands; . Driver.SwitchTo () window (browserTabs [1]); // Check whether or not this is the right page to open (eg check page title or URL etc) // Go to the Close tab and return the driver. Stop it (); . Driver.SwitchTo () window (browserTabs [0]);

Hope that any person coming in this thread will be helped.

Comments

Popular posts from this blog

c++ - Cmake produces file extensions in static library archives -

c# - Roxy file manager in MVC doesn't accept session path -

c# - Check if a NumericUpDown has no value -