Open link in new tab selenium c#

前端 未结 2 1824
予麋鹿
予麋鹿 2021-01-16 12:24

I am writing a program to run videos listed on my site for testing purpose and here what I need is to run videos in different tabs of the same browser window.

I hav

2条回答
  •  轮回少年
    2021-01-16 13:17

    Here is a simple solution for open a new tab in seleneium c#:

    driver.Url = "http://www.gmail.net";
    IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
    js.ExecuteScript("window.open();");
    

提交回复
热议问题