Selenium not detecting the second window in IE

前端 未结 4 1187
醉话见心
醉话见心 2021-01-05 09:20

My application opens up a new window on clicking a button and i need to perform some actions in that window. But the response getWindowHandles() method of selenium webdriver

4条回答
  •  渐次进展
    2021-01-05 09:55

    Dunno what is Set, but I tested with following code

    while (true)
                {
                    int qw = ololo.WindowHandles.Count;
                    string[] wh = ololo.WindowHandles.ToArray();
                    ololo.FindElement(By.LinkText("Помощь")).Click();
                    Thread.Sleep(1000);
                }
    

    And it worked perfectly.

提交回复
热议问题