appium / appium-for-mac

[deprecated] Application for automating a mac app with JSON wire protocol
Apache License 2.0
193 stars 70 forks source link

fix: Ensure JSON responses with the value key set to null is serialized correctly. #88

Closed mkrautz closed 4 years ago

mkrautz commented 4 years ago

When using the browser.keys() API via webdriver.io, WDIO expects a value key to be present in the response. Currently, this JSON response is not serialized correctly by AppiumForMac.

This commit remedies that by using an NSNull value in place of a bare nil. This causes the response to be correctly serialized as intended.

Note: this is not exclusive to AppiumForMac. For example, WinAppDriver has a very similar bug: https://github.com/microsoft/WinAppDriver/issues/740

jsf-clabot commented 4 years ago

CLA assistant check
All committers have signed the CLA.

mkrautz commented 4 years ago

@mykola-mokhnach Fixed.