diff options
Diffstat (limited to 'example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js')
-rw-r--r-- | example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js b/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js index 1078b04b..37d60649 100644 --- a/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js +++ b/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js @@ -16,14 +16,13 @@ var findCIDImageURL = function() { return JSON.stringify(imgLinks); } -var replaceImageSrc = function(jsonString) { - var parsedJson = JSON.parse(jsonString); +var replaceImageSrc = function(info) { var images = imageElements(); for (var i = 0; i < images.length; i++) { var url = images[i].getAttribute('src'); - if (url.indexOf(parsedJson.URLKey) == 0) { - images[i].setAttribute('src', parsedJson.LocalPathKey); + if (url.indexOf(info.URLKey) == 0) { + images[i].setAttribute('src', info.LocalPathKey); break; } } |