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

Workaround for the case TISCopyCurrentKeyboardLayoutInputSource() returns NULL #33

Closed y0z closed 6 years ago

y0z commented 6 years ago

TISGetInputSourceProperty returns NULL if the specified property is missing or invalid for the specified input source. Such as Japanese keyboard layout causes this problem.

Appium for mac crashes when the function returns NULL because of NULL pointer access.

I found a workaround for the problem (https://github.com/Kentzo/ShortcutRecorder/issues/56#issuecomment-190102586) and add it to appium. I feel it seems to work fine.

xcode_capture

jsf-clabot commented 6 years ago

CLA assistant check
All committers have signed the CLA.