The way the modules are organized, loading TouchAction at startup causes it to be in memory before Element exists. This means that when you go to use an action you get a TypeError (TypeError: Right-hand side of 'instanceof' is not callable) since Element is not a constructor anymore.
The way the modules are organized, loading
TouchAction
at startup causes it to be in memory beforeElement
exists. This means that when you go to use an action you get a TypeError (TypeError: Right-hand side of 'instanceof' is not callable
) since Element is not a constructor anymore.See, for instance, the errors in https://api.travis-ci.org/v3/job/395898891/log.txt
Fix by lazily loading the class through a getter.
See also https://github.com/appium/appium/issues/10937