當前位置: 首頁>>代碼示例>>Java>>正文


Java Platform.VISTA屬性代碼示例

本文整理匯總了Java中org.openqa.selenium.Platform.VISTA屬性的典型用法代碼示例。如果您正苦於以下問題:Java Platform.VISTA屬性的具體用法?Java Platform.VISTA怎麽用?Java Platform.VISTA使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.openqa.selenium.Platform的用法示例。


在下文中一共展示了Platform.VISTA屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: external

@DataProvider
public Object[][] external() {
    return new Object[][]{
            {"win7", Platform.VISTA},
            {"vista", Platform.VISTA},
            {"Vista", Platform.VISTA},
            {"win8_1", Platform.WIN8_1},
            {"XP", Platform.XP},
            {"Win7", Platform.VISTA},
            {"win7", Platform.VISTA},
            {"Windows Server 2012", Platform.WIN8},
            {"windows 8", Platform.WIN8},
            {"win8", Platform.WIN8},
            {"windows 8.1", Platform.WIN8_1},
            {"win8.1", Platform.WIN8_1},
            {null, null},
            {"w8", null},
            {Platform.ANDROID, Platform.ANDROID}
    };
}
 
開發者ID:jabbrwcky,項目名稱:selenium-api,代碼行數:20,代碼來源:PlatformMatcherTest.java

示例2: 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

示例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: nonMatchParam

@CapabilityFilter(platform = Platform.VISTA)
@Test
public void nonMatchParam() throws Exception {
	assertAllAssumed();
}
 
開發者ID:hifive,項目名稱:hifive-pitalium,代碼行數:5,代碼來源:AssumeCapabilityTest.java

示例5: createChromeBrowser

private void createChromeBrowser(DesiredCapabilities capabilities) throws MalformedURLException {

    if (scope == BrowserScope.LOCAL) {
      // Management of chromedriver
      ChromeDriverManager.getInstance().setup();
    }

    // Chrome options
    ChromeOptions options = new ChromeOptions();

    // Chrome extensions
    if (extensions != null && !extensions.isEmpty()) {

      for (Map<String, String> extension : extensions) {
        InputStream is = getExtensionAsInputStream(extension.values().iterator().next());
        if (is != null) {
          try {
            File crx = File.createTempFile(extension.keySet().iterator().next(), ".crx");
            FileUtils.copyInputStreamToFile(is, crx);
            options.addExtensions(crx);
          } catch (Throwable t) {
            log.error("Error loading Chrome extension {} ({} : {})", extension, t.getClass(),
                t.getMessage());
          }
        }
      }
    }

    if (enableScreenCapture) {
      // This flag enables the screen sharing
      options.addArguments("--enable-usermedia-screen-capturing");

      String windowTitle = TEST_SCREEN_SHARE_TITLE_DEFAULT;
      if (platform != null
          && (platform == Platform.WINDOWS || platform == Platform.XP || platform == Platform.VISTA
              || platform == Platform.WIN8 || platform == Platform.WIN8_1)) {

        windowTitle = TEST_SCREEN_SHARE_TITLE_DEFAULT_WIN;
      }
      options.addArguments("--auto-select-desktop-capture-source="
          + getProperty(TEST_SCREEN_SHARE_TITLE_PROPERTY, windowTitle));

    } else {
      // This flag avoids grant the camera
      options.addArguments("--use-fake-ui-for-media-stream");
    }

    // This flag avoids warning in Chrome. See:
    // https://code.google.com/p/chromedriver/issues/detail?id=799
    options.addArguments("--test-type");

    if (protocol == Protocol.FILE) {
      // This flag allows reading local files in video tags
      options.addArguments("--allow-file-access-from-files");
    }

    if (!usePhysicalCam) {
      // This flag makes using a synthetic video (green with
      // spinner) in WebRTC. Or it is needed to combine with
      // use-file-for-fake-video-capture to use a file faking the
      // cam
      options.addArguments("--use-fake-device-for-media-stream=fps=30");

      if (video != null && (isLocal() || isDocker())) {

        if (!Files.exists(Paths.get(video))) {
          throw new RuntimeException("Trying to create a browser using video file " + video
              + ", but this file doesn't exist.");
        }

        log.debug("Using video {} in browser {}", video, id);
        options.addArguments("--use-file-for-fake-video-capture=" + video);
      }
    }

    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    capabilities.setBrowserName(DesiredCapabilities.chrome().getBrowserName());

    createDriver(capabilities, options);
  }
 
開發者ID:Kurento,項目名稱:kurento-java,代碼行數:80,代碼來源:Browser.java


注:本文中的org.openqa.selenium.Platform.VISTA屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。