Created
November 3, 2017 08:43
-
-
Save rnemeth1980/477df14e2380647e278b25e29335c122 to your computer and use it in GitHub Desktop.
Firefox proxy settings in groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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