Hi Marcin, thank you very much for your help! It works as you wrote.
JsonObject json = *new *JsonObject();` json.addProperty(*"proxyType"*, *"MANUAL"*);` json.addProperty(*"httpProxy"*, PROXY); ` json.addProperty(*"sslProxy"*, PROXY); ` JsonArray jArray = *new *JsonArray();` jArray.add(*"127.0.0.1"*); jArray.add(*"localhost"*); jArray.add(*"selenium"*); json.add(*"noProxy"*, jArray); caps.setCapability(CapabilityType.*PROXY*, json); Unfortunately this issue blocks me https://github.com/mozilla/geckodriver/issues/1022. Best regards, Roland On Monday, October 30, 2017 at 10:16:07 PM UTC+1, Marcin Erdmann wrote: > > You should use json.add("noProxy", jArray); instead > of json.addProperty("noProxy", jArray); > > Marcin > > On Mon, Oct 30, 2017 at 3:58 PM, <[email protected] <javascript:>> wrote: > >> hi, >> I started with the following code >> http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp#firefox >> and this seems to be working >> >> JsonObject json = new JsonObject(); >> json.addProperty("proxyType", "MANUAL"); >> json.addProperty("httpProxy", PROXY); >> >> json.addProperty("sslProxy", PROXY); >> >> >> but I could not a noProxy list as the following is not working >> >> >> JsonArray jArray = new JsonArray(); >> jArray.add("127.0.0.1"); >> jArray.add("localhost"); >> jArray.add("selenium"); >> json.addProperty("noProxy", jArray); >> >> >> gives me >> >> >> groovy.lang.MissingMethodException: No signature of method: >> com.google.gson.JsonObject.addProperty() is applicable for argument types: >> (java.lang.String, com.google.gson.JsonArray) values: [noProxy, >> ["127.0.0.1","localhost","selenium"]] >> Possible solutions: addProperty(java.lang.String, >> java.lang.Boolean), addProperty(java.lang.String, java.lang.Character), >> addProperty(java.lang.String, java.lang.Number), >> addProperty(java.lang.String, java.lang.String), >> hasProperty(java.lang.String) >> >> >> or >> >> >> json.addProperty("noProxy", "127.0.0.1,localhost,selenium"); >> >> >> gives me >> >> >> org.openqa.selenium.InvalidArgumentException: "127.0.0.1,localhost,selenium" >> was not an array >> Build info: version: '3.6.0', revision: '6fbf3ec767', time: >> '2017-09-27T16:15:40.131Z' >> System info: host: '45fb2c56975f', ip: '172.17.0.4', os.name: >> 'Linux', os.arch: 'amd64', os.version: '4.4.74-boot2docker', java.version: >> '1.8.0_131' >> >> >> I am very thankful for any help or hint! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Geb User Mailing List" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/geb-user/111eb978-2378-4d24-abaf-1b2f1b2e2084%40googlegroups.com >> >> <https://groups.google.com/d/msgid/geb-user/111eb978-2378-4d24-abaf-1b2f1b2e2084%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/f565da5a-2f3b-4c49-8049-45b587a6168c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
