本文整理汇总了Java中org.openqa.selenium.firefox.FirefoxDriver.get方法的典型用法代码示例。如果您正苦于以下问题:Java FirefoxDriver.get方法的具体用法?Java FirefoxDriver.get怎么用?Java FirefoxDriver.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openqa.selenium.firefox.FirefoxDriver
的用法示例。
在下文中一共展示了FirefoxDriver.get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUpTest
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Before
public void setUpTest(){
System.setProperty("webdriver.gecko.driver", "C:\\webdriver\\geckodriver-v0.11.1-win64\\geckodriver.exe");
DesiredCapabilities dc = DesiredCapabilities.firefox();
dc.setCapability("marionette", true);
driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://www.doqconsulting.com.br/#contact");
}
示例2: testWithFirefoxAndOpera
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Test
public void testWithFirefoxAndOpera(FirefoxDriver firefox,
OperaDriver opera) {
firefox.get("http://www.seleniumhq.org/");
opera.get("http://junit.org/junit5/");
assertTrue(firefox.getTitle().startsWith("Selenium"));
assertTrue(opera.getTitle().equals("JUnit 5"));
}
示例3: setUpTest
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Before
public void setUpTest(){
System.setProperty("webdriver.gecko.driver", "C:\\webdriver\\geckodriver-v0.11.1-win64\\geckodriver.exe");
driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://www.google.com");
}
示例4: openFirefoxAtUrl
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
protected RemoteWebDriver openFirefoxAtUrl(String url) {
String geckoDriver = getGeckoDriver();
if (geckoDriver != null)
System.setProperty("webdriver.gecko.driver", geckoDriver);
driver = new FirefoxDriver();
driver.get(url);
return driver;
// driver = new ChromeDriver();
// driver.get(url);
// return driver;
}
示例5: webrtcTest
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Test
public void webrtcTest(FirefoxDriver driver) {
driver.get(
"https://webrtc.github.io/samples/src/content/devices/input-output/");
assertThat(driver.findElement(By.id("video")).getTagName(),
equalTo("video"));
}
示例6: webrtcTest
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Test
public void webrtcTest(@Arguments("-private") @Preferences({
"media.navigator.permission.disabled=true",
"media.navigator.streams.fake=true" }) FirefoxDriver driver) {
driver.get(
"https://webrtc.github.io/samples/src/content/devices/input-output/");
assertThat(driver.findElement(By.id("video")).getTagName(),
equalTo("video"));
}
示例7: testWithChromeAndFirefox
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Test
public void testWithChromeAndFirefox(ChromeDriver driver1,
FirefoxDriver driver2) {
driver1.get("http://www.seleniumhq.org/");
driver2.get("http://junit.org/junit5/");
assertThat(driver1.getTitle(), startsWith("Selenium"));
assertThat(driver2.getTitle(), equalTo("JUnit 5"));
}
示例8: testWithTwoFirefoxs
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Disabled("Redudant test for Travis CI suite")
// tag::snippet-in-doc[]
@Test
public void testWithTwoFirefoxs(FirefoxDriver driver1,
FirefoxDriver driver2) {
driver1.get("http://www.seleniumhq.org/");
driver2.get("http://junit.org/junit5/");
assertThat(driver1.getTitle(), startsWith("Selenium"));
assertThat(driver2.getTitle(), equalTo("JUnit 5"));
}
示例9: un_usuario_que_va_a_la_aplicasao
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Given("^un usuario que va a la aplicacion$")
public void un_usuario_que_va_a_la_aplicasao() throws Throwable {
//driver = new HtmlUnitDriver();
driver =new FirefoxDriver();
assertNotNull(driver);
driver.get(url);
}
示例10: init
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
public void init() throws IOException {
String target = System.getProperty("target", "local");
properties.load(new FileReader(new File(String.format("src/test/resources/%s.properties", target))));
dbHelper = new DbHelper();
if ("".equals(properties.getProperty("selenium.server"))) {
if (browserType.equals(BrowserType.FIREFOX)) {
wd = new FirefoxDriver();
} else if (browserType.equals(BrowserType.CHROME)) {
wd = new ChromeDriver();
}
} else {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName(browserType);
capabilities.setPlatform(Platform.fromString(System.getProperty("platform", "Linux")));
wd = new RemoteWebDriver(new URL(properties.getProperty("selenium.server")), capabilities);
}
wd.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);
wd.get(properties.getProperty("web.baseUri"));
contactHelper = new ContactHelper(wd, this);
groupHelper = new GroupHelper(wd, this);
navigationHelper = new NavigationHelper(wd, this);
sessionHelper = new SessionHelper(wd, this);
sessionHelper.login(properties.getProperty("web.adminLogin"), properties.getProperty("web.adminPass"));
if (Boolean.getBoolean("verifyUI")) {
log().warn("verifyUI is set. Tests could run slow!");
}
}
示例11: extensionTest
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Test
void extensionTest(@Extensions("hello_world.xpi") FirefoxDriver driver) {
driver.get("https://bonigarcia.github.io/selenium-jupiter/");
assertThat(driver.getTitle(),
containsString("A JUnit 5 extension for Selenium WebDriver"));
}
示例12: testWithOneFirefox
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Test
public void testWithOneFirefox(FirefoxDriver driver) {
driver.get("https://bonigarcia.github.io/selenium-jupiter/");
assertThat(driver.getTitle(),
containsString("A JUnit 5 extension for Selenium WebDriver"));
}
示例13: setUp
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Before
public void setUp() {
driver = new FirefoxDriver();
driver.get("http://localhost:8080/index.xhtml");
}
示例14: setUp
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Before
public void setUp() {
driver = new FirefoxDriver();
SignOnHelper.signOnRole(driver, Role.CONTRIBUTOR);
driver.get(DomainHelper.getBaseUrl() + "/content/storybook/list");
}
示例15: setUp
import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Before
public void setUp() {
driver = new FirefoxDriver();
SignOnHelper.signOnRole(driver, Role.ADMIN);
driver.get(DomainHelper.getBaseUrl() + "/admin/project/list");
}