【发布时间】:2016-02-09 13:55:09
【问题描述】:
我的 Firefox 最近更新了。我的 Firefox 版本是 44.0.1。当我在 selenium webdriver 中运行如下简单代码时,Firefox 中打开了两个选项卡。我怎样才能摆脱不需要的标签。我更改了 Firefox 设置,但仍然打开了两个选项卡。一个标签是普通标签,第二个标签是https://support.skype.com/en/faq/FA34612/what-is-the-skype-extension。如何在单个 Firefox 窗口中加载我想要自动化的 URL。我需要更改任何 Firefox 设置吗?
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;
public class Another {
@Test
public void tester(){
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://jqueryui.com/datepicker/");
}
}
【问题讨论】:
标签: firefox selenium-webdriver