Selenium C# Open New Tab CTRL+T Not working with CHROME

后端 未结 4 1418
太阳男子
太阳男子 2021-01-12 00:14
static void Main()
{
    IWebDriver driver = new ChromeDriver();
    driver.Navigate().GoToUrl(\"http://google.com\");
    IWebElement body = driver.FindElement(By.T         


        
4条回答
  •  抹茶落季
    2021-01-12 00:32

    Thanks for the answers! I did it with JavaScript.

    ((IJavaScriptExecutor)driver).ExecuteScript("window.open();");
    

提交回复
热议问题