当前位置: 首页>>代码示例>>Java>>正文


Java FirefoxDriver.get方法代码示例

本文整理汇总了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");
}
 
开发者ID:vitorc,项目名称:QA_Begin,代码行数:11,代码来源:TestContactDoq.java

示例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"));
}
 
开发者ID:bonigarcia,项目名称:mastering-junit5,代码行数:10,代码来源:LocalWebDriverTest.java

示例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");

}
 
开发者ID:vitorc,项目名称:QA_Begin,代码行数:9,代码来源:TestFindGoogle.java

示例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;
	}
 
开发者ID:mpay24,项目名称:mpay24-java,代码行数:13,代码来源:AbstractSeleniumTestcase.java

示例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"));
}
 
开发者ID:bonigarcia,项目名称:selenium-jupiter,代码行数:8,代码来源:FirefoxWithGlobalOptionsJupiterTest.java

示例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"));
}
 
开发者ID:bonigarcia,项目名称:selenium-jupiter,代码行数:10,代码来源:FirefoxWithOptionsJupiterTest.java

示例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"));
}
 
开发者ID:bonigarcia,项目名称:selenium-jupiter,代码行数:9,代码来源:SeleniumJupiterTest.java

示例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"));
}
 
开发者ID:bonigarcia,项目名称:selenium-jupiter,代码行数:11,代码来源:FirefoxJupiterTest.java

示例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); 
}
 
开发者ID:Arquisoft,项目名称:dashboard1b,代码行数:10,代码来源:loginStep.java

示例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!");
        }
    }
 
开发者ID:webarchitect609,项目名称:jstudy,代码行数:33,代码来源:ApplicationManager.java

示例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"));
}
 
开发者ID:bonigarcia,项目名称:selenium-jupiter,代码行数:7,代码来源:FirefoxWithOptionsJupiterTest.java

示例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"));
}
 
开发者ID:bonigarcia,项目名称:selenium-jupiter,代码行数:7,代码来源:FirefoxJupiterTest.java

示例13: setUp

import org.openqa.selenium.firefox.FirefoxDriver; //导入方法依赖的package包/类
@Before
public void setUp() {

    driver = new FirefoxDriver();
    driver.get("http://localhost:8080/index.xhtml");
}
 
开发者ID:Arquisoft,项目名称:Voting_2b,代码行数:7,代码来源:MainControllerTest.java

示例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");
}
 
开发者ID:elimu-ai,项目名称:webapp,代码行数:7,代码来源:StoryBookEditTest.java

示例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");
}
 
开发者ID:elimu-ai,项目名称:webapp,代码行数:7,代码来源:ProjectListTest.java


注:本文中的org.openqa.selenium.firefox.FirefoxDriver.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。