當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。