本文整理汇总了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();
}
示例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");
}
}
示例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);
}
示例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);
}
}
示例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);
}