Skip to content

Instantly share code, notes, and snippets.

@rnemeth1980
Created November 3, 2017 08:43
Show Gist options
  • Select an option

  • Save rnemeth1980/477df14e2380647e278b25e29335c122 to your computer and use it in GitHub Desktop.

Select an option

Save rnemeth1980/477df14e2380647e278b25e29335c122 to your computer and use it in GitHub Desktop.
Firefox proxy settings in groovy
String[] noProxyArray = ["127.0.0.1", "localhost", "selenium"]
def proxyMap = [proxyType:'MANUAL',
httpProxy:PROXY,
sslProxy:PROXY,
noProxy:noProxyArray
]
caps.setCapability(CapabilityType.PROXY, proxyMap);
Error message:
org.openqa.selenium.WebDriverException: java.util.ArrayList cannot be cast to java.lang.String
--------------------------------------------------------------------------------------------
def proxyMap = [proxyType:'MANUAL',
httpProxy:PROXY,
sslProxy:PROXY,
noProxy:'127.0.0.1,localhost,selenium'
]
caps.setCapability(CapabilityType.PROXY, proxyMap);
Error message:
org.openqa.selenium.InvalidArgumentException: "127.0.0.1,localhost,selenium" is not an array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment