mirror of
https://github.com/appium/appium.git
synced 2026-10-28 20:31:51 +08:00
* 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
36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
// transpile:main
|
|
|
|
// BaseDriver exports
|
|
import BaseDriver from './lib/basedriver/driver';
|
|
import DeviceSettings from './lib/basedriver/device-settings';
|
|
|
|
export { BaseDriver, DeviceSettings };
|
|
export default BaseDriver;
|
|
|
|
// MJSONWP exports
|
|
import { Protocol, routeConfiguringFunction, errors, isErrorType,
|
|
errorFromMJSONWPStatusCode, errorFromW3CJsonCode,
|
|
ALL_COMMANDS, METHOD_MAP, routeToCommandName,
|
|
NO_SESSION_ID_COMMANDS, isSessionCommand } from './lib/protocol';
|
|
|
|
export { Protocol, routeConfiguringFunction, errors, isErrorType,
|
|
errorFromMJSONWPStatusCode, errorFromW3CJsonCode, errorFromW3CJsonCode as errorFromCode,
|
|
ALL_COMMANDS, METHOD_MAP, routeToCommandName,
|
|
NO_SESSION_ID_COMMANDS, isSessionCommand };
|
|
|
|
// Express exports
|
|
import { server } from './lib/express/server';
|
|
export { server };
|
|
|
|
// jsonwp-proxy exports
|
|
import JWProxy from './lib/jsonwp-proxy/proxy';
|
|
export { JWProxy };
|
|
|
|
// jsonwp-status exports
|
|
import { codes, getSummaryByCode } from './lib/jsonwp-status/status';
|
|
const statusCodes = codes;
|
|
export { statusCodes, getSummaryByCode };
|
|
|
|
// W3C capabilities parser
|
|
import { processCapabilities } from './lib/basedriver/capabilities';
|
|
export { processCapabilities }; |