org.openqa.selenium.remote.Response.getSessionId()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(84)

本文整理了Java中org.openqa.selenium.remote.Response.getSessionId方法的一些代码示例,展示了Response.getSessionId的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getSessionId方法的具体详情如下:
包路径:org.openqa.selenium.remote.Response
类名称:Response
方法名:getSessionId

Response.getSessionId介绍

暂无

代码示例

代码示例来源:origin: org.seleniumhq.selenium/selenium-remote-common

public String toString() {
  return String.format("(%s %s: %s)", getSessionId(), getStatus(), getValue());
 }
}

代码示例来源:origin: org.seleniumhq.selenium.server/selenium-server-coreless

public String toString() {
  return String.format("(%s %s %s: %s)", getSessionId(), getContext(), isError(), getValue());
 }
}

代码示例来源:origin: org.seleniumhq.webdriver/webdriver-remote-client

@SuppressWarnings({"unchecked"})
protected void startSession(Capabilities desiredCapabilities) {
 Response response = execute("newSession", desiredCapabilities);
 Map<String, Object> rawCapabilities = (Map<String, Object>) response.getValue();
 String browser = (String) rawCapabilities.get("browserName");
 String version = (String) rawCapabilities.get("version");
 Platform platform;
 if (rawCapabilities.containsKey("operatingSystem")) {
  platform = Platform.valueOf((String) rawCapabilities.get("operatingSystem"));
 } else {
  platform = Platform.valueOf((String) rawCapabilities.get("platform"));
 }
 DesiredCapabilities returnedCapabilities = new DesiredCapabilities(browser, version, platform);
 returnedCapabilities.setJavascriptEnabled((Boolean) rawCapabilities.get("javascriptEnabled"));
 capabilities = returnedCapabilities;
 sessionId = new SessionId(response.getSessionId());
}

代码示例来源:origin: com.github.becausetesting/commons

sessionId = new SessionId(response.getSessionId());
if (response.getStatus() == null) {
  w3cComplianceLevel = 1;

代码示例来源:origin: com.github.becauseQA/becauseQA-utils

sessionId = new SessionId(response.getSessionId());
if (response.getStatus() == null) {
  w3cComplianceLevel = 1;

代码示例来源:origin: xebia/Xebium

if (response.getSessionId() == null) {
  HttpHost finalHost = (HttpHost) context.getAttribute(HTTP_TARGET_HOST);
  String uri = finalHost.toURI();

相关文章