admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

Add getter for TouchAction on ImageElement object #539

Closed imurchie closed 6 years ago

imurchie commented 6 years ago

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.

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

jlipps commented 6 years ago

published in 1.10.1

dpgraham commented 6 years ago

@jlipps Yeah it showed up when greenkeeper put in a PR to upgrade WD to 1.10.0