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


Java Platform.is方法代碼示例

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


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

示例1: matches

import org.openqa.selenium.Platform; //導入方法依賴的package包/類
@Override
public boolean matches(Object requested, Object provided) {
    Platform requestedPlatform = extractPlatform(requested);

    if (requestedPlatform != null) {
        Platform node = extractPlatform(provided);

        if (node == null) {
            return false;
        }
        if (!node.is(requestedPlatform)) {
            return false;
        }
    } else {
      LOGGER.warning(String.format("Unable to extract requested platform from '%s'.",requested));
    }

    return true;
}
 
開發者ID:jabbrwcky,項目名稱:selenium-api,代碼行數:20,代碼來源:PlatformMatcher.java

示例2: score

import org.openqa.selenium.Platform; //導入方法依賴的package包/類
@Override
public int score(Platform value) {
  if (!currentIsDesired || isNullOrAny(value)) {
    return 0;
  }

  return scoreAgainst.is(value) || value.is(scoreAgainst) ? 1 : -1;
}
 
開發者ID:alexkogon,項目名稱:grid-refactor-remote-server,代碼行數:9,代碼來源:CapabilitiesComparator.java

示例3: registerDefaults

import org.openqa.selenium.Platform; //導入方法依賴的package包/類
private void registerDefaults(Platform current) {
  for (Map.Entry<Capabilities, String> entry : defaultDrivers.entrySet()) {
    Capabilities caps = entry.getKey();
    if (caps.getPlatform() == null || caps.getPlatform() == Platform.ANY || current.is(caps.getPlatform())) {
      registerDriver(caps, entry.getValue());
    } else {
      log.info("Default driver " + entry.getValue() + " registration is skipped: registration capabilities "
               + caps.toString() + " does not match with current platform: " + current.toString());
    }
  }
}
 
開發者ID:alexkogon,項目名稱:grid-refactor-remote-server,代碼行數:12,代碼來源:DefaultDriverSessions.java

示例4: registerDriverProviders

import org.openqa.selenium.Platform; //導入方法依賴的package包/類
private void registerDriverProviders(Platform current) {
  for (DriverProvider provider : ServiceLoader.load(DriverProvider.class)) {
    Capabilities caps = provider.getProvidedCapabilities();
    if (caps.getPlatform() == null || caps.getPlatform() == Platform.ANY || current.is(caps.getPlatform())) {
      factory.registerDriverProvider(caps, provider);
    } else {
      log.info("Driver provider " + provider + " registration is skipped: registration capabilities "
               + caps.toString() + " does not match with current platform: " + current.toString());
    }
  }
}
 
開發者ID:alexkogon,項目名稱:grid-refactor-remote-server,代碼行數:12,代碼來源:DefaultDriverSessions.java

示例5: CurrentPlatformScorer

import org.openqa.selenium.Platform; //導入方法依賴的package包/類
private CurrentPlatformScorer(Platform currentPlatform, Platform desiredPlatform) {
  super(currentPlatform);
  currentIsDesired = !isNullOrAny(currentPlatform)
      && (currentPlatform.is(desiredPlatform) || desiredPlatform.is(currentPlatform));
}
 
開發者ID:alexkogon,項目名稱:grid-refactor-remote-server,代碼行數:6,代碼來源:CapabilitiesComparator.java


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