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# - Roxy file manager in MVC doesn't accept session path -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -

java - Ajax call to jsp and jsp redirecting to further jsp -