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


Java BrowserType.FIREFOX属性代码示例

本文整理汇总了Java中org.openqa.selenium.remote.BrowserType.FIREFOX属性的典型用法代码示例。如果您正苦于以下问题:Java BrowserType.FIREFOX属性的具体用法?Java BrowserType.FIREFOX怎么用?Java BrowserType.FIREFOX使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.openqa.selenium.remote.BrowserType的用法示例。


在下文中一共展示了BrowserType.FIREFOX属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDeploymentUnit

@Override
protected DeploymentUnit createDeploymentUnit() {

    String browserName = desiredCapabilities.getBrowserName();
    logger.info("Selenium browser: {}", browserName);

    String image;
    switch (browserName) {
        case BrowserType.CHROME:
            image = CHROME_IMAGE;
            break;
        case BrowserType.FIREFOX:
            image = FIREFOX_IMAGE;
            break;
        case BrowserType.PHANTOMJS:
            image = PHANTOMJS_IMAGE;
            break;
        default:
            throw new UnsupportedOperationException("Provided browser type '" + browserName + "' is not supported");
    }

    DeploymentUnit.Builder builder = new DockerDeploymentUnit.Builder("selenium", image)
            .withCpu(1)
            .withMem(1024)
            .withHealthProbe(new HttpProbe.Builder()
                    .withPath(SERVER_PATH)
                    .withPort(SELENIUM_PORT)
                    .build())
            .withPort(new DeploymentPort.Builder("selenium-server", SELENIUM_PORT)
                    .build())
            .withPort(new DeploymentPort.Builder("vnc-server", VNC_PORT)
                    .build());
    if (dimension != null) {
        builder.withEnvVar("SCREEN_WIDTH", String.valueOf(dimension.getWidth()))
                .withEnvVar("SCREEN_HEIGHT", String.valueOf(dimension.getHeight()));
    }
    return builder.build();

}
 
开发者ID:LivePersonInc,项目名称:ephemerals,代码行数:39,代码来源:SeleniumEphemeral.java

示例2: getImageForCapabilities

public static String getImageForCapabilities(DesiredCapabilities desiredCapabilities) {

        String seleniumVersion = SeleniumUtils.determineClasspathSeleniumVersion();

        String browserName = desiredCapabilities.getBrowserName();
        switch (browserName) {
            case BrowserType.CHROME:
                return String.format(CHROME_IMAGE, seleniumVersion);
            case BrowserType.FIREFOX:
                return String.format(FIREFOX_IMAGE, seleniumVersion);
            default:
                throw new UnsupportedOperationException("Browser name must be 'chrome' or 'firefox'; provided '" + browserName + "' is not supported");
        }
    }
 
开发者ID:testcontainers,项目名称:testcontainers-java,代码行数:14,代码来源:BrowserWebDriverContainer.java

示例3: multipleFilters

@CapabilityFilters({
		@CapabilityFilter(filterGroup = "pc", browserName = BrowserType.IE),
		@CapabilityFilter(platform = Platform.WINDOWS, browserName = { BrowserType.FIREFOX, BrowserType.CHROME }) })
@Test
public void multipleFilters() throws Exception {
	assertAssumed(2, 5, 6, 7, 8);
}
 
开发者ID:hifive,项目名称:hifive-pitalium,代码行数:7,代码来源:AssumeCapabilityTest.java

示例4: create

public static Actions create(final WebDriver webDriver) {
    switch (getBrowserName(webDriver)) {
    case BrowserType.CHROME:
        return new ChromeActions(webDriver);
    case BrowserType.IE:
        return new InternetExplorerActions(webDriver);
    case BrowserType.FIREFOX:
    case BrowserType.SAFARI:
        return new SyntheticActions(webDriver);
    default:
        return new DefaultActions(webDriver);
    }
}
 
开发者ID:MagenTys,项目名称:cinnamon,代码行数:13,代码来源:ActionsFactory.java

示例5: platformWindows_browserFirefoxChrome

@CapabilityFilter(platform = Platform.WINDOWS, browserName = { BrowserType.FIREFOX, BrowserType.CHROME })
@Test
public void platformWindows_browserFirefoxChrome() throws Exception {
	assertAssumed(0, 1, 2, 5, 6, 7, 8);
}
 
开发者ID:hifive,项目名称:hifive-pitalium,代码行数:5,代码来源:AssumeCapabilityTest.java


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