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


Java Platform.LINUX属性代码示例

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


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

示例1: testEquals_OS

@Test
public void testEquals_OS() {
    TestEnvironment left = new TestEnvironment(null, null, Platform.WINDOWS);
    TestEnvironment right = new TestEnvironment(null, null, Platform.WINDOWS);

    assertTrue(left.matches(right));

    right = new TestEnvironment(null, null, Platform.LINUX);
    assertFalse(left.matches(right));

    right = new TestEnvironment(null, null, Platform.XP);
    assertTrue(left.matches(right));

    right = new TestEnvironment(null, null, Platform.VISTA);
    assertTrue(left.matches(right));

    right = new TestEnvironment(null, null, Platform.ANY);
    assertTrue(left.matches(right));
}
 
开发者ID:gfk-ba,项目名称:senbot,代码行数:19,代码来源:TestEnvironmentTest.java

示例2: addPlatform

@Override
public WebCapabilitiesBuilder addPlatform(final String platform)
{
    Platform platformName = null;

    switch (platform.toLowerCase())
    {
        case "windows":
            platformName = Platform.WINDOWS;
            break;
        case "xp":
            platformName = Platform.XP;
            break;
        case "linux":
            platformName = Platform.LINUX;
            break;
        case "mac":
            platformName = Platform.MAC;
            break;
        default:
            platformName = Platform.WINDOWS;
            break;
    }

    capabilities.setPlatform(platformName);
    return this;
}
 
开发者ID:pradeeptaswain,项目名称:oldmonk,代码行数:27,代码来源:WebCapabilitiesBuilder.java

示例3: platforms

@DataProvider
public Object[][] platforms() {
    return new Object[][]{
            {"win7", Platform.VISTA, true},
            {"win7", "windows 7", true},
            {"vista", Platform.VISTA, true},
            {"darwin", Platform.MAC, true},
            {Platform.ANY, Platform.LINUX, true},
            {"linux", Platform.LINUX, true},
            {"linux", Platform.UNIX, false},
            {null, Platform.XP, true},
    };
}
 
开发者ID:jabbrwcky,项目名称:selenium-api,代码行数:13,代码来源:PlatformMatcherTest.java

示例4: testWebElementsDriverProperties

@Test
public void testWebElementsDriverProperties() throws MalformedURLException {
    DesiredCapabilities expectedDesiredCapabilities = new DesiredCapabilities(BrowserType.CHROME, "39.0", Platform.LINUX);
    assertThat(new DesiredCapabilities(webDriverProperties.getDesiredCapabilities()), equalTo(expectedDesiredCapabilities));
    assertThat(webDriverProperties.isStateful(), equalTo(true));
    assertThat(webDriverProperties.getUrl(), equalTo(new URL("http://localhost:4444/wd/hub")));
    assertThat(webDriverProperties.getWindow().getSize(), equalTo(new DimensionProperties(1280, 1024)));
    assertThat(webDriverProperties.getWindow().getPosition(), nullValue());
}
 
开发者ID:viltgroup,项目名称:minium,代码行数:9,代码来源:WebDriverConfigurationTest.java


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