Commit Graph

234 Commits

Author SHA1 Message Date
dependabot-preview[bot] 163b34dc2f chore(deps): bump argparse from 1.0.10 to 2.0.1 (#14687)
Bumps [argparse](https://github.com/nodeca/argparse) from 1.0.10 to 2.0.1.
- [Release notes](https://github.com/nodeca/argparse/releases)
- [Changelog](https://github.com/nodeca/argparse/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/argparse/compare/1.0.10...2.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Mykola Mokhnach <mokhnach@gmail.com>
2020-09-02 22:01:20 +02:00
Isaac A. Murchie 74ebc3aff8 refactor: use util.pluralize (#13926) 2020-02-07 14:20:50 -05:00
Mykola Mokhnach 30c8cb353f feat: Make sure all active sessions are cleaned up properly after a termination signal is received (#13913) 2020-02-05 07:48:09 +01:00
Mykola Mokhnach 67eeed5279 chore: Provide a better driver load failure description (#13815) 2020-01-08 16:45:59 +01:00
Mykola Mokhnach 5ecd5a4790 chore: Make attachUnexpectedShutdownHandler method more forgivable (#13662) 2019-12-04 08:01:17 +01:00
Mykola Mokhnach 563dc542df feat: Bump base driver to version 5 (#13635) 2019-11-26 07:30:24 +01:00
TruongSinh Tran-Nguyen 85856e764f feat: Support Flutter driver (#12945)
* Support Flutter driver

As discussed in https://github.com/appium/appium/issues/12919#issuecomment-513566934, we need to declare package name and class name for Flutter Driver. In the long run however, I believe this part of code should be refactored so that arbitrary driver can run without code change from `appium` core. Security risk should be minimal because that package must be installed beforehand anyway.

* `prepare` supersedes `prepublish`

This will also helps with install directly via git,
e.g. `npm i -g git://github.com/appium/appium`

* add flutter driver in deps
2019-11-21 16:34:49 -05:00
Isaac A. Murchie 8fba6bd239 fix: stop printing caps twice on session start (#13101)
* fix: stop printing caps twice on session start

* fix: remove questionable call to hasOwnProperty

* Use _.has
2019-08-22 07:22:33 -05:00
Isaac A. Murchie 1422473a5c feat: Remove Selendroid driver (#12964) 2019-07-25 10:26:24 -04:00
Jonathan Lipps 2bd4e486a7 better printing of insecure feature names 2019-06-20 13:09:42 -07:00
Jonathan Lipps ede9605458 add full docs for new security flag 2019-06-20 11:16:48 -07:00
Jonathan Lipps ecac10a3e1 add --allow-insecure and --deny-insecure server flags 2019-06-19 15:02:50 -07:00
Dan Graham bc9718899f Set UiAutomator2 as default Android driver (#12621) 2019-05-10 08:40:40 -07:00
Kazuaki Matsuo e35e4f7bae add setting --tmp arg as process.env.APPIUM_TMP_DIR (#12585)
* set process.env.APPIUM_TEMP_DIR

* rename

* fix comment
2019-05-04 23:52:09 +09:00
Kazuaki Matsuo 277ed72d45 pass arg to super in AppiumDriver (#12572) 2019-05-02 12:51:12 +09:00
Dan Graham 72adc8b0ab Add automationName deprecation warning for Android (#12481) 2019-04-12 13:58:01 -07:00
Mykola Mokhnach 3d5ce43e58 Add a possibility to parse initial values for Appium settings from capabilities (#12440) 2019-04-07 19:59:34 +02:00
Kazuaki Matsuo 734850a305 add tvOS platform as xcuitest (#12401)
* add tvOS platform

* get xcuitest over 2.111
2019-03-31 09:07:51 +09:00
Isaac A. Murchie 048e25a6e3 Allow 'appium' automationName and particular platformName (#12415) 2019-03-29 14:33:13 -04:00
flyofsky 106ccf931a Fixed to set tizen driver in appium (#12270) 2019-03-08 09:23:11 -05:00
Isaac A. Murchie 60fc87ea2d Lazy load drivers upon request (#12127)
* Lazy load drivers upon request

* Handle different cases in aUtOmAtIoNnAmE
2019-02-07 08:27:10 -08:00
Dan Graham ac0bed0a80 Add deprecation notice when automationName not set (#11979)
* Add deprecation notice when automationName not set

* PR changes
2019-01-14 19:56:34 -08:00
greenkeeper[bot] 10753839a9 Update eslint-config-appium to the latest version 🚀 (#11952)
* chore(package): update eslint-config-appium to version 4.0.1

* chore: fix linting

* chore: rebase and done
2019-01-08 07:43:50 -06:00
Isaac A. Murchie 4ff699a80a Remove error logging from getting the build info (#11499) 2018-10-09 13:44:35 -04:00
Isaac A. Murchie 7f3f136557 Update appium-gulp-plugins (#11461) 2018-10-03 09:39:25 -04:00
Mykola Mokhnach 41cc517cbf Return more appropriate info as server status and speed it up (#11232)
* Improve /status response for the umbrella driver
2018-08-28 15:42:33 +02:00
Isaac A. Murchie f80a75fdac Add Tizen as automationName for appium-tizen-driver (#11262) 2018-08-27 10:21:39 -04:00
Isaac A. Murchie 6ae14c852f Add automationName and platformName desired cap constraints (#11008) 2018-07-05 14:29:05 -04:00
Isaac A. Murchie 2fee4d7c5a Move maps into constants (#10967)
* Move maps into constants

* More constiness for jlipps

* A little format change
2018-06-29 12:35:02 -04:00
Isaac A. Murchie 32c4441a7a Fix the build (#10971) 2018-06-29 12:25:47 -04:00
Mykola Mokhnach 1c24b0f649 Refactor driver creation logic in the umbrella driver (#10966)
* Refactor driver selection flow

* Fix the logic

* Apply some more optmizations

* Address comments

* Simplify the condition

* Use correct function
2018-06-28 19:57:05 +02:00
flyofsky 40ed9c066d Add Tizen Driver (#10938)
* Support the Tizen

* Add Tizen Driver in package.json (#3)
2018-06-28 09:35:23 -04:00
Mykola Mokhnach b06cc534dd Fix server property assignment in the umbrella driver (#10496) 2018-04-06 19:04:02 +02:00
Dan Graham b4d27a4281 Pass protocol in execute command (#10362)
* Make it so executeCommand returns protocol and value/error
  * This is so that base driver can read the protocol and serve the response (base driver doesn't know what the protocol of the inner drivers are)
  * Added tests to confirm that it falls back to MJSONWP if an inner driver is not ready and handles concurrent MJSONWP and W3C sessions
  * Updated unit tests to match the new format
2018-03-27 14:39:48 -07:00
Mykola Mokhnach 0774ffcefc Attach server instance to each driver being created (#10400) 2018-03-23 07:39:15 +01:00
Mykola Mokhnach 8093a35121 Use uia2 backend by default if platform version is greater or equal to 6 (#10073)
* Use uia2 backend by default if platform version is greater or equal to 6

* Allow to force set the backend to UIA1

* Add unit tests

* Tune the log message

* Print a warning message instead of changing the driver type

* Remove redundant imports

* Tune the message

* Address PR comments
2018-01-29 17:14:52 +01:00
Dan Graham ee569cbed1 Use MJSONWP if dcaps have extraneous params (#10019)
* Update `parseCapsForInnerDriver` so that now if it finds extraneous keys in `jsonwpCaps`, fall back to using MJSONWP instead of W3C
* After getting processed caps, check the protocol again because if `processedW3CCapabilities` was set to null, it should be JWP
* Removed tests that tested for capabilities being merged together (those are no longer needed)
* Added tests (unit test and e2e test) that check that creation of a new session will fall back to JSONWP when there are extraneous keys
2018-01-18 13:02:09 -08:00
Dan Graham fb7280da32 No hardcoded automation names (#10002) 2018-01-17 07:48:30 -05:00
Dan Graham f27d6565d0 W3C Full Implementation (#9972)
* Refactored code from createSession into parseCapsForInnerDriver()
  * parseCapsForInnerDriver() takes jsonwp and w3c capabilities and translates them into objects that can be accepted by the "inner driver" that it proxies to
  * It adds defaultCapabilities to capabilities.firstMatch and jsonwp caps
  * It finds matching caps for W3C and then creates a new W3C capabilities object that only has the valid matching one
  * After parseCapsForInnerDriver() parses the JSONWP and W3C it passes the results along to the inner-driver and it's up to the inner driver to create a W3C or JSONWP session

* Add validation to W3C session creation
  * Call to 'processCapabilities' does validation now so that it will match an object that passes Appium's validation rules (e.g.: platformName, deviceName required; automation name must be valid, etc...)
  * Test that it accepts combo of W3C and JSONWP capabilities
  * Test that it rejects invalid W3C capabilities with 400 error
  * Also added 'createSession' unit test
  * Stripped out unnecessary async/await from driver-specs

* Insert Appium prefixes into W3C caps
  * Previously, Appium just took the W3C capabilities, processed them into a caps object and 
  passed them into the inner driver as

  ```
  {
    alwaysMatch: parsedCaps,
    firstMatch: [{}],
  }
  ```

  * The problem with this is that all of the parsedCaps were unprefixed, and therefore the Inner 
  Driver complained about it

  * Now, it takes the parsedCaps and calls a new method called 'insertAppiumPrefixes' on the 
  parsed caps like this:

  ```
  {
    alwaysMatch: {...insertAppiumPrefixes(parsedCaps)},
    firstMatch: [{}],
  }
  ```

  * Refactored tests that were affected by this change
  * Added tests to test insertAppiumPrefixes function
2018-01-16 10:26:44 -08:00
Dan Graham b666c3353c Force MJSONWP protocol (#9869)
* The 'executeCommand' on appium-base-driver checks the protocol by looking for the w3c 'capabilities' object
* Right now it's finding it and then appium is merging capabilities into desiredCapabilities so we're getting a case of 'createSession' misidentified as W3C
* Fix for next release is just to monkey-patch the method that determines the protocol to return MJSONWP
2018-01-02 09:40:28 -05:00
Dan Graham f62a2a2875 Merge W3C caps into JSONWP desiredCapabilities (#9824) 2017-12-20 15:13:49 -08:00
Dan Graham a8911ba51c Support w3c createSession (#9791)
* In 'createSession', process w3c caps using 'processCapabilities' method exposed by base-driver
* Add tests that run W3C requests on server to verify that it's accepting w3c format
2017-12-15 09:24:28 -08:00
Mykola Mokhnach b8199b8472 Remove redundant variable 2017-12-14 14:26:02 +01:00
Mykola Mokhnach af8fed6186 tune logging 2017-12-14 14:24:36 +01:00
Mykola Mokhnach 1e47e1b0a9 Address review comments 2017-12-14 14:22:19 +01:00
Mykola Mokhnach dca6708fe6 Add relaxed security command line flag 2017-12-13 20:49:45 +01:00
Isaac Murchie 3d7dd1e857 Fix logging of caps 2017-11-06 09:21:59 -05:00
Wei Gu 433a453903 Fix synchrous issue: appium may call session check even after session is deleted (#9550) 2017-10-30 14:42:26 -04:00
Mykola Mokhnach 89242a40bc Cancel commands queueing for the umbrella driver (#9052) 2017-08-22 09:45:24 -04:00
Mykola Mokhnach 64ccbc1a98 Add basic synchonization to session creation and deletion (#8983)
* Guard sessions and pending drivers lists

* Address review comments

* Improve session deletion

* Perform fast return if the session is not present in the sessions list
2017-08-21 14:16:12 -04:00