类org.openqa.selenium.remote.ExecuteMethod源码实例Demo

下面列出了怎么用org.openqa.selenium.remote.ExecuteMethod的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: selenium   文件: PerformanceLoggingMockTest.java
@Test
public void testMergesRemoteLogs() {
  final ExecuteMethod executeMethod = mock(ExecuteMethod.class);

  when(executeMethod.execute(
      DriverCommand.GET_LOG, ImmutableMap.of(RemoteLogs.TYPE_KEY, LogType.PROFILER)))
      .thenReturn(Arrays.asList(ImmutableMap.of(
        "level", Level.INFO.getName(),
        "timestamp", 1L,
        "message", "second")));

  LocalLogs localLogs = LocalLogs.getStoringLoggerInstance(singleton(LogType.PROFILER));
  RemoteLogs logs = new RemoteLogs(executeMethod, localLogs);
  localLogs.addEntry(LogType.PROFILER, new LogEntry(Level.INFO, 0, "first"));
  localLogs.addEntry(LogType.PROFILER, new LogEntry(Level.INFO, 2, "third"));

  List<LogEntry> entries = logs.get(LogType.PROFILER).getAll();
  assertThat(entries).hasSize(3);
  for (int i = 0; i < entries.size(); ++i) {
    assertThat(entries.get(i).getTimestamp()).isEqualTo(i);
  }
}
 
源代码2 项目: java-client   文件: AppiumDriver.java
@Override
public ExecuteMethod getExecuteMethod() {
    return executeMethod;
}
 
源代码3 项目: selenium   文件: DevToolsProvider.java
@Override
public HasDevTools getImplementation(Capabilities caps, ExecuteMethod executeMethod) {
  Optional<DevTools> devTools = SeleniumCdpConnection.create(caps).map(DevTools::new);

  return () -> devTools.orElseThrow(() -> new IllegalStateException("Unable to create connection to " + caps));
}
 
源代码4 项目: selenium   文件: AddLocationContext.java
@Override
public LocationContext getImplementation(Capabilities capabilities, ExecuteMethod executeMethod) {
  return new RemoteLocationContext(executeMethod);
}
 
源代码5 项目: selenium   文件: RemoteLocationContext.java
public RemoteLocationContext(ExecuteMethod executeMethod) {
  this.executeMethod = executeMethod;
}
 
源代码6 项目: selenium   文件: AddApplicationCache.java
@Override
public ApplicationCache getImplementation(Capabilities capabilities, ExecuteMethod executeMethod) {
  return new RemoteApplicationCache(executeMethod);
}
 
源代码7 项目: selenium   文件: RemoteLocalStorage.java
public RemoteLocalStorage(ExecuteMethod executeMethod) {
  this.executeMethod = executeMethod;
}
 
源代码8 项目: selenium   文件: AddWebStorage.java
@Override
public WebStorage getImplementation(Capabilities capabilities, ExecuteMethod executeMethod) {
  return new RemoteWebStorage(executeMethod);
}
 
源代码9 项目: selenium   文件: RemoteApplicationCache.java
public RemoteApplicationCache(ExecuteMethod executeMethod) {
  this.executeMethod = executeMethod;
}
 
源代码10 项目: selenium   文件: RemoteWebStorage.java
public RemoteWebStorage(ExecuteMethod executeMethod) {
  this.executeMethod = executeMethod;
}
 
源代码11 项目: selenium   文件: RemoteSessionStorage.java
public RemoteSessionStorage(ExecuteMethod executeMethod) {
  this.executeMethod = executeMethod;
}
 
源代码12 项目: selenium   文件: RemoteNetworkConnection.java
public RemoteNetworkConnection(ExecuteMethod executeMethod) {
  this.executeMethod = executeMethod;
}
 
源代码13 项目: selenium   文件: AddNetworkConnection.java
@Override
public NetworkConnection getImplementation(Capabilities capabilities, ExecuteMethod executeMethod) {
  return new RemoteNetworkConnection(executeMethod);
}
 
 类所在包
 同包方法