Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98768

find element in new opened tab selenium c# [duplicate]

$
0
0

This question already has an answer here:

How to find element in new opened tab selenium c#, here is code to open new tab and switch to it:

new Actions(driver)
    .KeyDown(OpenQA.Selenium.Keys.Control)
    .Click(NewPost)
    .KeyUp(OpenQA.Selenium.Keys.Control)
    .Perform();
                                Thread.Sleep(1000);
                                //driver.SwitchTo().Window(driver.WindowHandles.Last());

                          ReadOnlyCollection<string> tabs = driver.WindowHandles;
                            driver.SwitchTo().Window(tabs[1]);

how find element in new tab, for example tabs[1], Thanks for help


Viewing all articles
Browse latest Browse all 98768

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>