Avoid prematurely serializing the Proxy in FirefoxDriver
It'll be correctly converted to a json object and sent across
the wire, and the XPI was already half expecting a valid
object too.
@@ -242,6 +242,7 @@ private static FirefoxOptions getFirefoxOptions(Capabilities capabilities) {
if (marionette instanceof Boolean) {
options.setLegacy(!(Boolean) marionette);
}
+
return options;
}
@@ -302,7 +303,7 @@ private static Capabilities dropCapabilities(Capabilities capabilities) {
// Ensure that the proxy is in a state fit to be sent to the extension
Proxy proxy = Proxy.extractFrom(capabilities);
if (proxy != null) {
- caps.setCapability(PROXY, new BeanToJsonConverter().convert(proxy));
+ caps.setCapability(PROXY, proxy);
}
return caps;
