Commit Graph

20 Commits

Author SHA1 Message Date
Jonathan Lipps 38ea7752ce chore: merge main branch 2020-08-31 13:35:46 -07:00
Jonathan Lipps 8bb644d874 feat: allow use of --plugins=all to activate all plugins, and show helpful startup text 2020-08-31 13:30:49 -07:00
Mykola Mokhnach 93004b75c4 fix: Only strip known prefixes from capability names (#14492) 2020-06-30 07:57:25 +02:00
Mykola Mokhnach 3a41f32e42 chore: Tune handling of default capabilities (#13887) 2020-01-29 17:07:42 +01:00
Jonathan Lipps d9dfa35c00 chore: update imports to use basedriver v4 (#13135)
* chore: update imports to use basedriver v4

* fix: don't use /wd/hub in docs anymore
2019-08-27 18:32:48 -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 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 fab9973674 Write defaultCapabilities into firstMatch instead of alwaysMatch only if it is not overriden (#11303)
Partially addresses protocol setting issue in #11300
2018-09-04 20:43:31 +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 fc84cc1212 Remove prefixes from MJSONWP capabilities if W3C protocol cannot be enabled (#10948) 2018-06-26 15:56:41 -04:00
Dan Graham 001e2f3674 Add VSCode launch configurations (#10683)
* Added debug, attach to debug, test-all, and test-current-file
* The debug and attach to debug allow you to run Appium server
* Made some changes to how package.json is located to support being able to run Mocha tests directly from 'test/' instead of from 'build/test/'
2018-05-15 11:35:46 -07: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
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
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
Isaac Murchie 3d7dd1e857 Fix logging of caps 2017-11-06 09:21:59 -05:00