mirror of
https://github.com/appium/appium.git
synced 2026-02-21 10:49:52 -06:00
Not all the results returned from instruments are valid json.
This commit is contained in:
@@ -92,8 +92,12 @@ Appium.prototype.push = function(elem) {
|
||||
if (result === 'undefined') {
|
||||
target[1]();
|
||||
} else {
|
||||
var jsonresult = JSON.parse(result);
|
||||
target[1](jsonresult);
|
||||
try {
|
||||
var jsonresult = JSON.parse(result);
|
||||
target[1](jsonresult);
|
||||
} catch (e) {
|
||||
target[1](result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user