mirror of
https://github.com/appium/appium.git
synced 2026-02-06 09:38:53 -06:00
deprecate use of json page source
This commit is contained in:
@@ -17,6 +17,7 @@ var errors = require('../../server/errors.js')
|
||||
, path = require('path')
|
||||
, XMLDom = require("xmldom")
|
||||
, helpers = require('../../helpers.js')
|
||||
, warnDeprecatedCustom = helpers.logCustomDeprecationWarning
|
||||
, warnDeprecated = helpers.logDeprecationWarning;
|
||||
|
||||
var androidController = {};
|
||||
@@ -371,6 +372,14 @@ androidController.getPageSource = function (cb) {
|
||||
],
|
||||
// Top level cb
|
||||
function () {
|
||||
warnDeprecatedCustom('page source', 'json',
|
||||
"You got the source of the app using the page source command. This " +
|
||||
"command is undergoing a large change which will be released in " +
|
||||
"Appium 1.0. The change will include returning an XML document " +
|
||||
"instead of a JSON object. If you depend on the page source command " +
|
||||
"you should try the new version, which is accessible by doing " +
|
||||
"`driver.execute_script('mobile: source', [{type: 'xml'}])`, or " +
|
||||
"the equivalent in your language bindings.");
|
||||
cb(null, {
|
||||
status: status.codes.Success.code
|
||||
, value: json
|
||||
|
||||
Reference in New Issue
Block a user