org.openqa.selenium.Proxy.getProxyType()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(231)

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

Proxy.getProxyType介绍

[英]Gets the ProxyType. This can signal if set to use a direct connection (without proxy), manually set proxy settings, auto-configured proxy settings, or whether to use the default system proxy settings. It defaults to ProxyType#UNSPECIFIED.
[中]获取代理类型。如果设置为使用直接连接(无代理)、手动设置代理设置、自动配置的代理设置,或者是否使用默认系统代理设置,这可能会发出信号。它默认为ProxyType#未指定。

代码示例

代码示例来源:origin: detro/ghostdriver

switch (proxy.getProxyType()) {
  case MANUAL:
    if (proxy.getHttpProxy() != null && !proxy.getHttpProxy().isEmpty()) {          //< HTTP proxy

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

StringBuilder builder = new StringBuilder("Proxy(");
switch (getProxyType()) {
 case AUTODETECT:
 case DIRECT:
 case MANUAL:
 case SYSTEM:
  builder.append(getProxyType().toString().toLowerCase());
  break;

代码示例来源:origin: org.seleniumhq.selenium/selenium-htmlunit-driver

if (proxy == null || proxy.getProxyType() == Proxy.ProxyType.UNSPECIFIED) {
 return;
switch (proxy.getProxyType()) {
 case MANUAL:

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

@Override
public boolean equals(Object o) {
 if (this == o) {
  return true;
 }
 if (o == null || getClass() != o.getClass()) {
  return false;
 }
 Proxy proxy = (Proxy) o;
 return isAutodetect() == proxy.isAutodetect() &&
     getProxyType() == proxy.getProxyType() &&
     Objects.equals(getFtpProxy(), proxy.getFtpProxy()) &&
     Objects.equals(getHttpProxy(), proxy.getHttpProxy()) &&
     Objects.equals(getNoProxy(), proxy.getNoProxy()) &&
     Objects.equals(getSslProxy(), proxy.getSslProxy()) &&
     Objects.equals(getSocksProxy(), proxy.getSocksProxy()) &&
     Objects.equals(getSocksVersion(), proxy.getSocksVersion()) &&
     Objects.equals(getSocksUsername(), proxy.getSocksUsername()) &&
     Objects.equals(getSocksPassword(), proxy.getSocksPassword()) &&
     Objects.equals(getProxyAutoconfigUrl(), proxy.getProxyAutoconfigUrl());
}

代码示例来源:origin: com.codeborne/phantomjsdriver

switch (proxy.getProxyType()) {
  case MANUAL:
    if (proxy.getHttpProxy() != null && !proxy.getHttpProxy().isEmpty()) {          //< HTTP proxy

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

@Override
 public int hashCode() {
  return Objects.hash(
    getProxyType(),
    isAutodetect(),
    getFtpProxy(),
    getHttpProxy(),
    getNoProxy(),
    getSslProxy(),
    getSocksProxy(),
    getSocksVersion(),
    getSocksUsername(),
    getSocksPassword(),
    getProxyAutoconfigUrl());
 }
}

代码示例来源:origin: com.opera/operadriver

if (proxy.getProxyType() == Proxy.ProxyType.UNSPECIFIED) {
 return;
switch (proxy.getProxyType()) {
 case DIRECT:
  if (!product.is(MOBILE)) {
  logger.warning("Unsupported proxy type: " + proxy.getProxyType());

相关文章