Selenium webdriver selecting new window c#

前端 未结 6 1192
清歌不尽
清歌不尽 2020-12-15 07:01

Trying to write some test cases using selenium webdriver in c# and have a scenario which i\'m unsure of how to resolve

user scenario is searching a table for a patie

6条回答
  •  萌比男神i
    2020-12-15 07:32

    It is really easy in Selenium WebDriver. By using SwitchTo method

    driver.SwitchTo().Window(driver.WindowHandles.Last());
    

    See this blog post as well

    http://binaryclips.com/2015/03/13/selenium-webdriver-in-c-switch-to-new-window/

提交回复
热议问题