The issue tebeka/selenium/issues/236 was happening because the method json.marshal was being called twice on the same data. Once on remote.SetAlertText and again on remote.voidCommand. This currupted the data and resulted in a malformed json wich led to the error on the api call.
I removed the first time json.marshal was called, on the SetAlertText funcion, which then calls the voidCommand that performs json.marshal and executes the API call. This fixed the bug.
The issue tebeka/selenium/issues/236 was happening because the method json.marshal was being called twice on the same data. Once on remote.SetAlertText and again on remote.voidCommand. This currupted the data and resulted in a malformed json wich led to the error on the api call.
I removed the first time json.marshal was called, on the SetAlertText funcion, which then calls the voidCommand that performs json.marshal and executes the API call. This fixed the bug.