102 Commits
Author SHA1 Message Date
Bruno Alassia 3efdad8cb9 feat: Add parseCapsArray to base driver (#333) 2019-07-17 09:41:01 -07:00
Jonathan Lipps 23d6ecf949 Add endpoint that receives a webdriver script for batch command execution (#328)
* add executeDriverScript route, command, tests

* allow driver scripts to write and collect console logs

* ensure driver script protocol is set to same protocol as driver, and also includes all appium commands

* implement isFeatureEnabled to check for insecure feature

* add tests for isFeatureEnabled

* update feature flag name to match style of other flags

* add ensureFeatureEnabled method for use by other drivers

* move driver script execution into a child process so we can kill it if necessary

* use this.opts.address instead of this.opts.host

* ensure driver script timeout is a number in the child proc as well

* ensure we get webdriverio without issues
2019-06-25 12:12:27 -07:00
Siddartha Pradhan 69dde698d6 Better message for creating session with W3C (#331) 2019-06-17 20:25:58 +02:00
Kazuaki Matsuo e3caf43337 add getting result image by find by image (#327)
* add getMatchedImageResult and return the result if it is true

* add tests

* tweak error case
2019-05-29 13:00:17 +09:00
Isaac A. Murchie d214a0d1f2 Be more explicit about unrecognized caps (#317) 2019-04-09 13:02:46 -04:00
Mykola Mokhnach 73b69f2ef9 Use proper Error object when throwing download failures (#316) 2019-04-08 10:36:08 -07:00
Jonathan Lipps 98e11b68e4 factor out image element registration to helper function (#312)
...so the function can be used by other drivers / plugins
2019-04-08 09:05:50 -07:00
Jonathan Lipps 009602ce56 add isArray to the cap validation strategies 2019-04-04 07:52:40 -07:00
Isaac A. Murchie b0d7e2e77b Update bluebird (#310)
* Upgrade bluebird

* Remove catch for CancellationError

* Make image command cancellable too
2019-03-26 15:58:11 -04:00
Isaac A. Murchie 5b12eebcf0 Add function names (#309) 2019-03-21 14:38:22 -04:00
Kazuaki Matsuo b38ef751f4 Fix template scale in find element by image (#307)
* add imageTemplateDefaultScale to scale arbitrary scale every time by default

* put all of template scaling into one method

* increase test cases to cover all situations

* define gnoreDefaultImageTemplateScale for click

* add a comment

* tweak comments

* fix typo, default value, docstring

* fix review

* fix ratio potential issue

* use const instead of let

* tweak a comment about scale factor

* remove _, tweak NaN comparison

* use math.round to compare two float

* rename float round constant

* fix typo

* update imgObj

* fix comments
2019-03-20 09:00:02 +09:00
Kazuaki Matsuo 3ec8e5675f Fix find element wrong coordinate (#306)
* fix wrong coordinate for android and ios

* separate fixScaleTemplateImage

* add fixScaleTemplateImage as a settings

* take care of both landscape and portrate

* rename to fixTemplateImageScale

* rename ratio to scale

* does not scale if the arg is non number

* rename preference name, default value

* remove comment outted lines

* add null filter as safer way
2019-03-01 10:23:09 +09:00
Isaac A. Murchie 5425101d0c Remove generic string->boolean warning (#305) 2019-02-20 10:03:19 -05:00
Mykola Mokhnach 8d7da14d06 Fix application type handling for urls with parameters (#303) 2019-02-18 19:13:44 +01:00
Mykola Mokhnach a969967a26 Apply command timeout only if queuing is enabled (#298) 2019-01-28 20:04:39 +01:00
greenkeeper[bot] 4eab674f92 Update eslint-config-appium to the latest version 🚀 (#295)
* chore(package): update eslint-config-appium to version 4.0.1

* chore: fix linting
2019-01-07 13:11:57 -06:00
Dan Graham 644208fe60 Copy W3C/Element keys instead of renaming them (#290) 2018-12-10 13:24:36 -08:00
Mykola Mokhnach df80b7cd2b Make sure the app is not cleaned up if relative path is provided (#289) 2018-12-04 18:07:52 +01:00
Mykola Mokhnach 06094f2500 Consider getting file extension from the url if response headers are not useful (#288) 2018-11-30 18:14:30 +01:00
Dan Graham 6f565760df Do not use static yet. Still experimental. (#286) 2018-11-22 13:51:01 -08:00
greenkeeper[bot] 4291f7cef7 Update lru-cache to the latest version 🚀 (#284)
* fix(package): update lru-cache to version 5.0.0

* Fix call to LRU
2018-11-21 08:14:07 -05:00
Jonathan Lipps f86b4c5685 allow correct downloading of zipped apps without content type header (#282) 2018-11-14 07:55:42 -08:00
Mykola Mokhnach cf0e95baf8 Automatically fix relative application paths (#276) 2018-11-02 10:02:20 +01:00
Mykola Mokhnach 3141e831cb Properly synchronize applications caching (#274) 2018-10-22 16:10:35 +02:00
Mykola Mokhnach 9657712c90 Remove samba support (#273) 2018-10-19 15:43:16 -07:00
Mykola Mokhnach 14cfcfcef7 Make it possible to pass multiple supported extensions to configureApp helper (#271) 2018-10-19 20:27:54 +02:00
Jonathan Lipps 02b3b87164 add custom locator strategy (#268)
* add custom locator strategy

* address review comments

* allow customFindModules cap to register multiple modules as an object

* add unit tests for custom element finding plugin
2018-10-12 10:19:57 -07:00
Isaac Murchie 2f4366187a Fix exports for new Babel 2018-10-03 09:17:26 -04:00
Isaac A. Murchie 04af064564 Update appium-gulp-plugins (#266) 2018-10-03 09:00:58 -04:00
Mykola Mokhnach d0d85bf6ff Allow numbers-as-strings while performing capabilities verification (#264) 2018-09-27 19:35:55 +02:00
Mykola Mokhnach d80a78a615 Fix protocol detection inside the routing function (#257) 2018-09-08 20:39:08 +02:00
Mykola Mokhnach 5231fae89b Apply additional fixes to timeouts handler (#250)
* Apply additional fixes to timeouts handler

* Address comments

* Update the rest of tests

* Remove unused import

* fix the unit test
2018-08-15 15:26:47 +02:00
Kazuaki Matsuo b90ed154d9 fix raising NotYetImplementedError against commands which exist in image-element (#245)
* fix raising NotYetImplementedError when the element is image-element
2018-08-05 22:37:59 +09:00
Jonathan Lipps ec72948de2 add -image locator strategy and related logic (#235)
* 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
2018-07-30 13:17:54 -07:00
Isaac A. Murchie f0bb198d7d Remove list of possible values for platformName cap (#233) 2018-07-12 09:15:23 -04:00
Dan Graham c6c56093f5 Handle /timeouts W3C + MJSONWP proxying (#231) 2018-07-11 09:05:01 -07:00
Dan Graham ae21c08248 Log typos (#232) 2018-07-06 19:05:12 -07:00
Isaac A. Murchie 5f318b4eef Remove list of valid automation names (#229) 2018-06-29 11:02:08 -04:00
Mykola Mokhnach 94522d13be Log errors, which happens during caps merging (#228) 2018-06-27 22:04:04 +02:00
flyofsky 89da842132 Add Tizen tag in desired-caps.js for supporting Tizen (#1) (#227) 2018-06-25 12:52:18 -04:00
Dan Graham f72dc5a3ac Fix: Make 'reset' re-use same protocol (#219)
* Before, reset was creating a new session and using the processed caps
* The problem with is, if it was W3C it would create a MJSONWP
* Now it checks the protocol before resetting and passes in the appropriate args to createSession depending on the protocol type
2018-06-07 13:15:28 -07:00
greenkeeper[bot] 8439803500 Update dependencies to enable Greenkeeper 🌴 (#216)
* chore(package): update dependencies

* docs(readme): add Greenkeeper badge

* chore: adapt code to updated dependencies
2018-06-04 14:48:50 -04:00
Mykola Mokhnach 72dd453b9a Enforce UTF-8 encoding on request headers (#214)
* Enforce UTF-8 encoding on request headers

* Return all headers in lowercase as per HTTP/2 requirement
2018-05-29 07:15:23 +02:00
Mykola Mokhnach 700017fccf Add missing await (#207) 2018-05-06 08:03:05 +02:00
Isaac A. Murchie 1f87d0e289 Update dependencies (#206)
* Update deps

* Fix a couple of tests

* Fix protocol tests

* Fix timeout in helper and protocol tests
2018-04-27 11:08:08 -04:00
Mykola Mokhnach 6311b34615 Add an universal endpoint for images comparison (#203)
* Add an universal endpoint for images comparison

* Rename arguments

* Add documentation

* Raise appium-support version
2018-04-19 15:53:15 +02:00
Dan Graham da4f28f7d9 Fix: Determine protocol in createSession (#194)
* Previously, we were only checking the HTTP payload to see what protocol should be
* This is inadequate, in the case of drivers that don't proxy W3C Capabilities yet
* The fix now is to set the protocol in `createSession` to see if the W3C caps were proxied through, if they're not, set protocol to MJSONWP
* Added unit test and one e2e test to confirm that this works
2018-03-14 15:44:50 -07:00
Isaac A. Murchie b143cff884 Add logging commands to the base driver (#191)
* Add logging commands to the base driver

* Address comments
2018-02-23 12:02:20 -05:00
Mykola Mokhnach c0bb5166c8 Print more advanced error message for non-supported protocols (#189) 2018-02-21 17:20:48 +01:00
Mykola Mokhnach d47d597731 Add urls caching logic (#187)
* Add urls caching logic

* Tune date verification

* Fix dictionary access

* tune try/catch scope

* simplify the condition
2018-02-16 14:51:16 +01:00