21 Commits
Author SHA1 Message Date
Dan Graham 7ffda66813 Fixed W3C error messaging (#182)
* Do proxying for W3C responses
  * If a W3C Response is provided by a proxy, map to the correct error
  * Checks if `value` is an object and `value.error` and maps it based on that (`value.error` is the W3C error code)
  * Broke off `errorFromCode` into `errorFromMJSONWPStatusCode` and `errorFromW3CJsonCode`
* Rename '.error' property to correct W3C property
  * The error property in the ProtocolError objects should match up with https://www.w3.org/TR/webdriver/#handling-errors under the 'JSON Error Code' column
  * Added tests for all of these
* Make ProxyRequestError work for W3C
  * Added an arg called `.w3c` that passes in the proxied W3C error
  * Fixed the `getActualError` function that looks for the .w3c variable and parses error from the code
2018-02-05 11:55:56 -08:00
Dan Graham 97c02c8af0 Rename 'mjsonwp' to 'protocol' (#178)
* Rename 'mjsonwp' to 'protocol'
  * Renamed folder from 'mjsonwp' to 'protocol' in `lib/` and `test/`
  * Renamed 'mjsonwp.js' to 'protocol.js'
  * Renamed any import statements that use 'mjsonwp'
  * _Possible breaking change_: MJSONWireProtocol class exposed in index was renamed to just Protocol.... checked Appium repo and found no libraries that use MJSONWireProtocol
* Lint fix
2018-01-29 12:41:14 -08:00
cschabetsberger-micro-focus b7b0b7b2f3 Detect a non-working chromedriver connection after androidDriver.closeApp() and androidDriver.launchApp() (#136)
* * Make sure to detect a non-working chromedriver connection after calling androidDriver.closeApp() and androidDriver.launchApp() by returning the result body (resBody) only if it does not contain a status code

* Adapted unit test to cover the case when chromedriver responds with http
200 but status code != 0 (which represents an error)
Also fixed a typo in another test description
2017-10-13 09:05:02 -04:00
Isaac A. Murchie 01e9914b66 Update linting and add coverage (#131) 2017-08-15 08:53:47 -04:00
Mykola Mokhnach dd084953b8 Add warning message for erroneous responses to make debugging easier (#119) 2017-05-16 09:47:09 -07:00
Mykola Mokhnach d5ffe5773a Add proxy method to verify whether it has a request in progress and to cancel active requests (#105) 2017-02-21 08:49:43 -05:00
Isaac Murchie bb1f869ca9 Add configurable request timeout to proxy 2017-01-04 12:48:22 -05:00
Isaac Murchie 1de1af6b0c Remove logger, and start using one from appium-support 2016-12-20 12:55:23 -05:00
Isaac Murchie d2c5caafd4 Move appium-logger into base driver 2016-11-23 09:15:38 -08:00
rkavalap 0e8b1d966e Increase length in _truncate for proxy requests for better debugging 2016-11-10 09:36:54 -08:00
Isaac Murchie 76efb2428f Proper length handling 2016-10-17 14:04:44 -04:00
Isaac Murchie 6be9493240 Extent the length of the proxy req/res we log 2016-10-14 09:13:57 -04:00
Isaac Murchie 3368192456 Use keep-alive connection for proxying 2016-09-30 15:17:53 -04:00
Isaac Murchie 931ea9f06d Give a long timeout on proxy 2016-09-14 12:31:34 -04:00
Sravan Medrapu c5026bf227 Implemented throwing ProxyRequestError
ProxyRequestError will be thrown for all unsuccessfull proxy requests, ProxyRequestError will contain the actual error route cause information(`jsonwp`)
2016-09-09 16:17:24 +05:30
Yosef Durr 8c5d7dbfa5 add Windows platform, fix utf-8 typo 2016-07-03 17:07:57 -07:00
rafael.chavez c3071eb9db status is not always successful. 2016-05-19 16:25:01 -07:00
Jonathan Lipps 0514c251cf code changes, es6ification, and tests for jsonwp-status 2016-05-06 08:42:28 -07:00
Jonathan Lipps a08cd21501 add files for jsonwp-status merge 2016-05-06 08:42:28 -07:00
Jonathan Lipps fb1ce61f38 code updates for jwproxy merge 2016-05-06 08:42:28 -07:00
Jonathan Lipps ea45d22269 copy over initial jsonwp-proxy files 2016-05-06 08:42:28 -07:00