我是测试自动化的初学者,尝试学习selenium。
我在C#中使用实现了一些自动化
我面临一个问题,在执行测试中,设置页在chrome浏览器中是默认打开的,而URL是在第二个选项卡中打开的。
仅需的网址应在铬.中打开
我在windows 10上的c#中使用selenium chrome驱动程序。
有人能帮忙吗?如何预防这一问题?
谢谢。
发布于 2017-11-17 14:37:58
你能试试这个吗?
ChromeOptions options = new ChromeOptions();
options.AddArguments("--disable-infobars");
options.AddArguments("--start-maximized");
options.AddUserProfilePreference("credentials_enable_service", false);
driver= new ChromeDriver("path to chrome driver"), options, TimeSpan.FromMinutes(3));
driver.Navigate().GoToUrl("http://www.google.com");https://stackoverflow.com/questions/47347733
复制相似问题