当前位置: 首页>>代码示例>>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;未经允许,请勿转载。