Commit Graph

1104 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
Mykola Mokhnach 93004b75c4 fix: Only strip known prefixes from capability names (#14492) 2020-06-30 07:57:25 +02:00
Mykola Mokhnach da83532ba0 chore: Replace requests usage with axios (#14269) 2020-05-05 10:05:37 +02:00
Mykola Mokhnach 3a41f32e42 chore: Tune handling of default capabilities (#13887) 2020-01-29 17:07:42 +01:00
Mykola Mokhnach 563dc542df feat: Bump base driver to version 5 (#13635) 2019-11-26 07:30:24 +01:00
Isaac A. Murchie 2aa4e33db5 tests: fix the build (#13553) 2019-11-07 08:45:50 -05:00
Mykola Mokhnach d3081ca46b fix: Update the expected error code (#13371) 2019-10-07 08:14:00 +02: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
Mykola Mokhnach 3d5ce43e58 Add a possibility to parse initial values for Appium settings from capabilities (#12440) 2019-04-07 19:59:34 +02:00
Isaac A. Murchie 048e25a6e3 Allow 'appium' automationName and particular platformName (#12415) 2019-03-29 14:33:13 -04:00
Isaac A. Murchie 8e5ec38d3f Add function names (#12370) 2019-03-22 15:13:02 -04: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
Isaac A. Murchie 97fbb1942e Update node version checks (#11996) 2019-01-15 12:06:00 -05: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 29922f8931 Store built bundle in github not bintray (#11893) 2018-12-21 16:47:44 -05:00
Isaac A. Murchie 5229607571 Make sure xcuitest driver is built when bundling (#11871)
* Make sure xcuitest driver is built when bundling

* Test documentation generation on PRs too

* Run docs gen testing on Linux
2018-12-19 16:22:13 -05:00
Dan Graham 9c2c455a30 Fix never-ending test (#11789) 2018-12-06 06:31:28 -08:00
Isaac A. Murchie 102f5ed0f3 Update winston logger (#11583) 2018-10-26 13:39:38 -04:00
Mykola Mokhnach bfcca7243b Do not use Github API fallback by default (#11506) 2018-10-10 18:41:33 +02:00
Isaac A. Murchie 7f3f136557 Update appium-gulp-plugins (#11461) 2018-10-03 09:39:25 -04:00
Mykola Mokhnach fcfefd02c7 Fix the key name for the default capability (#11316)
* Fix the key name for the default capability

* Add a unit test for default caps
2018-09-06 07:11:16 +02: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 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 eebc1d57a1 Try to automatically fix W3C capabilities by using existing JSONWP caps (#10962) 2018-06-28 18:17:03 -07: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
dan@saucelabs.com a15cfa5ddb Configure to work on Travis 2018-06-22 09:35:31 -07:00
Isaac A. Murchie 812a6bf4f3 Update dependencies (#10666) 2018-05-08 11:19:41 -04:00
Isaac A. Murchie f452ffb76c Fix the build (#10437) 2018-03-28 15:57:13 -04: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
Isaac A. Murchie 348eacf3d1 Move to minimum node 6 (#10180) 2018-02-12 15:03:11 -05:00
Dan Graham 1c6aa98a53 Fix outdated test (#10162) 2018-02-08 15:06:48 -05:00
Dan Graham 47e8955bf4 Test content-type in errors (#10077) 2018-01-25 13:10:45 -08:00
Dan Graham 35135a6ee5 Remove unnecessary 'finally' block (#10076)
* Shouldn't have had finally block because then it does two checks to fall back to MJSONWP
* Also fixed outdated tests
2018-01-25 12:45:02 -08:00
Dan Graham 050db9880a Fall back to MJSONWP if W3C is invalid (#10034)
* If processCapabilities throws error, then log a warning that it was invalid and log the message and fall back to using jsonwpCaps
2018-01-18 18:07:56 -08: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
Isaac A. Murchie ac8be0076c Get rid of arrow functions in mocha aparatus (#10013) 2018-01-17 15:34:50 -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
Isaac A. Murchie 94635edeac Update linting (#9123)
* Update linting

* Move minimum node version to 5

* Remove coverage for now

* Fix docs for node version

* Fail for node 4 and below
2017-08-31 07:49:43 -04:00
Mykola Mokhnach 48e411bfe2 Pass the list of running sessions to deleteSession (#8907)
* Pass the list of running sessions to deleteSession

* Tune the logic for getting other sessions data

* update unit test

* Skip unused argument
2017-07-31 17:14:56 -04:00
Isaac Murchie 90d62dd7dd Move to logger from appium-support 2017-02-28 15:09:49 -05:00
Dan Graham 6f5a9d1001 Don't allow undefined process.argv[1] in parser
argParse breaks if process.argv[1], which is a problem if Appium is being run as a binary. Added check so that if process.argv[1] is undefined, set the prog name to 'Appium'
2017-02-10 11:38:41 -08:00
Jonathan Lipps 3db81cc19a refactor unexpected shutdown, and fix lint so we can use upgraded appium eslint 2016-12-07 14:39:03 -08:00
shoma 34b83a2982 Remove duplicate trailing in jshintrc for test 2016-12-06 10:48:24 +09:00
Jonathan Lipps fb4a9c0be0 make XCUITest driver the default for ios tests with platformVersion >= 10 2016-08-18 14:59:31 -07:00