Commit Graph

202 Commits

Author SHA1 Message Date
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
Mykola Mokhnach 83d0cc3468 Include the information about pending drivers being currently at creation stage into createSession argument (#8925)
* Include the information about pending drivers being currently at creation stage into createSession argument

* Address review comments
2017-07-31 17:16:05 -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
Yatin Phatak e8d59cda59 getStatus command from grid should not be queued (#8819) 2017-07-12 07:42:03 -04:00
Dan Graham 09622aea33 Espresso Driver added to appium (#8640) 2017-06-09 11:03:00 -07:00
Dan Cuellar 9af79b2b81 Add MacDriver (#8046)
* Add MacDriver

* Add MacDriver to version map

* Add some notes about Mac

* Update README.md

* Add section about mac apps.

* Move information to running on OS X page
2017-03-16 16:27:19 -07:00
Isaac Murchie cea2448c55 Add version string to driver announcement 2017-01-27 12:46:47 -05: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
Sravan Medrapu 8813cbdf1d Added UiAutomator2 Driver 2016-10-01 23:50:47 +05:30
Jonathan Lipps 52f990a2f4 don't do an implicit string+int comparison 2016-08-18 16:28:18 -07:00
Jonathan Lipps fb4a9c0be0 make XCUITest driver the default for ios tests with platformVersion >= 10 2016-08-18 14:59:31 -07:00
Isaac A. Murchie 0c14015659 Merge pull request #6664 from jlipps/master
add WinAppDriver beta under the Windows platform
2016-08-08 12:08:15 -07:00
Isaac Murchie 50725af059 Add eslint and pre-commit hooks 2016-08-03 12:14:29 -07:00
jlipps fa98737c4f add WinAppDriver beta under the Windows platform 2016-07-15 10:10:42 -07:00
Isaac Murchie 4843d41679 Update to new name for xcuitest driver 2016-07-08 10:52:08 -07:00
Simon Granger 340a83ab93 Added You.i Engine support 2016-07-07 17:26:33 -04:00
Isaac Murchie 5a67708df0 Add ability to use automationName XCUITest 2016-06-22 09:56:45 -07:00
Jonathan Lipps a09e3e00f6 use appium-base-driver instead of mjsonwp/express/proxy 2016-05-19 14:02:12 -07:00
Isaac Murchie 406a06a7de Support the sessionOverride flag 2016-04-29 11:02:41 +02:00
Srinivasan Sekar a62c7f5909 Lo-dash library update to improve js performance
Removed migration library

Removed migration library

updated request-promise to support to lo-dash 4.0

Reverted request promise update till we upgrade bluebird

Dont fix caps (will be done in inner drivers)

reverted other lib updates

Removed helpers as it is moved to base driver

Update dependencies and fix node version

Resolved merge conflicts

Updated lodash after merge conflicts
2016-03-19 00:03:15 +05:30
Isaac Murchie c2ac161a9e Dont fix caps (will be done in inner drivers) 2016-03-17 07:30:54 -07:00
Jonah Stiennon 72aeb807ad fix NewCommandTimeout handling for freshly created sessions 2016-01-20 11:51:35 -08:00
Scott Dixon e579024fb2 Implemented missing getStatus method 2016-01-08 14:39:33 -08:00
Isaac Murchie 67c7e935ef Fix logging of args and caps 2016-01-05 13:17:46 -08:00
Isaac Murchie abb7b543aa Add handling of boolean caps 2015-12-30 08:34:28 -08:00
Isaac A. Murchie 8dbcdd47bd Merge pull request #5822 from appium/isaac-cleanup
Cleanup
2015-11-17 13:43:41 -08:00
Isaac Murchie 5eb61db0f9 Fix proxy handling 2015-11-17 12:58:59 -08:00
Isaac Murchie b31295a7d9 Clean up and fix sync 2015-11-11 10:47:31 -08:00
Isaac Murchie 2e3d354d6b Fix some style stuff 2015-11-10 13:47:41 -08:00
Isaac A. Murchie 72ef20a142 Merge pull request #5818 from appium/isaac-proxy
Check with individual drivers for proxy status
2015-11-10 13:45:40 -08:00
Isaac Murchie 8bd544b5b1 Check with individual drivers for proxy status 2015-11-10 13:04:56 -08:00
Isaac Murchie f6693c1c88 Wire selendroid into appium 2015-11-09 09:18:48 -08:00
Isaac Murchie 7a85a4a3d7 Add helpers for checking proxy status 2015-10-29 10:41:33 -07:00