Commit Graph

1364 Commits

Author SHA1 Message Date
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
Mykola Mokhnach
b06cc534dd Fix server property assignment in the umbrella driver (#10496) 2018-04-06 19:04:02 +02:00
Andres Galindo
048ca4be43 Added support for hub protocol (#10434) 2018-03-28 15:57:48 -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
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
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
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
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
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 Graham
0b3441fdff Remove date-utils library and use node-dateformat (#8328)
* Removed date-utils and removed require
* Replaced call to date.toFormat(...) with dateformat(date, '...')
2017-04-26 13:03:31 -04:00
Mykola Mokhnach
c04c8e4758 Add --enable-heapdump feature (#8176)
* Add possibility to take snapshots of node process memory heap

* Move heapdump to optional dependencies
2017-04-18 12:06:39 -04: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
90d62dd7dd Move to logger from appium-support 2017-02-28 15:09:49 -05:00
Isaac Murchie
0142e5a917 Fix formatting of default capabilities 2017-02-14 11:19: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
Isaac Murchie
cea2448c55 Add version string to driver announcement 2017-01-27 12:46:47 -05:00
Isaac Murchie
9503b3d03d Once catch signals once 2017-01-05 08:04:29 -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
Isaac A. Murchie
02edea9d29 Merge pull request #7015 from KrugerHeavyIndustries/graceful_exit
graceful handling of SIGTERM and SIGINT such that return codes are mo…
2016-10-28 14:46:57 +02:00
Rubén González Alonso
069a33c5eb Fix grid register with Selenium 3 hubs 2016-10-25 18:16:12 +02:00
Rubén González Alonso
ea93f0b1d3 Allow to connect an Appium node to Selenium Grid 3 2016-10-20 17:21:28 +02:00
Chris Kruger
f43247e38b graceful handling of SIGTERM and SIGINT such that return codes are more in line Unix process exit codes 2016-10-19 17:30:53 +08:00
Alex Lau
95819c29ab Fix --suppress-adb-kill-server command line argument 2016-10-17 14:13:38 -07:00
Isaac A. Murchie
9362fb224b Merge pull request #6920 from sravanmedarapu/master
Added UiAutomator2 Driver
2016-10-01 16:48:31 -04:00
Sravan Medrapu
8813cbdf1d Added UiAutomator2 Driver 2016-10-01 23:50:47 +05:30
Omuro
513c39b852 Add server parameter for WebDriverAgent local port 2016-09-27 16:37:33 -07:00
Ali Kia
b127b80cc2 add reboot option for android emulator 2016-09-09 13:34:21 +08:00
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
Sam Park
1482423198 Remove default ChromeDriver port in arg parse
If null and required, Android driver will pick a random available one
2016-08-18 09:40:33 -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