* add -image locator strategy and related logic
* use appium-support jimp helper
* handle find multiple elements by image
* update staleness check variable name
* ensure that a settings object always exists so we can rely on global settings always existing too
* only fix template size if user requests it in settings
* add note about implicit wait error handling
* only automatically update image element position if user turns on an appropriate setting
* add setting to control whether we check for image element staleness
* add setting to determine the image element tap strategy (w3c or mjsonwp)
* prefer single quotes
* add setting to turn off screenshot resizing if not desired
* add docstrings (except for cache class which we may not keep)
* address additional review comments
* add better jsdoc arg info
* use lru-cache npm package instead of rolling our own
* use new versino of appium-support
* make sure the lru cache is checking element size correctly
* give better names and tighten up logic around image el tap strategies
* add some unit tests for image elements
* ensure DeviceSettings has a default no-op update method
* check that driver implements action strategies and fall back / throw as appropriate
* finish out image element unit tests
* have basedriver set noop onSettingsUpdate rather than doing it in DeviceSettings
* move route avoidance detection from protocol to driver
* handle proxying actions to downstream drivers during image tap
* tighten up logic for deciding whether to proxy based on presence of image element
* add find by image specs and fix issues that arose in the process
* clean up regexes
* don't try to be smart and proxy actions for drivers; let them set it up themselves to support image elements
* change default match threshold based on experimentation
* export which settings are handled by basedriver so downstream drivers can utilize this information
* make sure to include a duration for the initial pointerMove action
* add docstring to proxyRouteIsAvoided
* Before it was throwing immediately which meant we weren't parsing the protocol and weren't showing the proper error responses
* If proxied W3C error doesn't have an error, make it `Unknown Error`
* Some problems with parsing `{protocol: <protocol>, value: <value>}`
* `(!_.isNil(driverRes.value)` was incorrect check because `value` can be undefined or null; replaced it with `_.has(driverRes, 'value')` to check that the `value` property was set
* ```
if (driverRes.value) {
driverRes = driverRes.value;
}
```
was also incorrect because `driverRes.value` may be false-y
* Moved logic into it's own function and then added tests to cover the problem cases
* If`executeCommand` returns an object that has a property 'protocol' and either a 'value' property or an 'error' property, respond with the provided protocol
* If the object is of this form, than it came from another driver that knows what protocol is being used so we re-assign the protocol to whatever was reported
* Added to delay in the 'unexpected exits' test because I was getting a race condition
* Do proxying for W3C responses
* If a W3C Response is provided by a proxy, map to the correct error
* Checks if `value` is an object and `value.error` and maps it based on that (`value.error` is the W3C error code)
* Broke off `errorFromCode` into `errorFromMJSONWPStatusCode` and `errorFromW3CJsonCode`
* Rename '.error' property to correct W3C property
* The error property in the ProtocolError objects should match up with https://www.w3.org/TR/webdriver/#handling-errors under the 'JSON Error Code' column
* Added tests for all of these
* Make ProxyRequestError work for W3C
* Added an arg called `.w3c` that passes in the proxied W3C error
* Fixed the `getActualError` function that looks for the .w3c variable and parses error from the code
* Rename 'mjsonwp' to 'protocol'
* Renamed folder from 'mjsonwp' to 'protocol' in `lib/` and `test/`
* Renamed 'mjsonwp.js' to 'protocol.js'
* Renamed any import statements that use 'mjsonwp'
* _Possible breaking change_: MJSONWireProtocol class exposed in index was renamed to just Protocol.... checked Appium repo and found no libraries that use MJSONWireProtocol
* Lint fix