appium/appium — pull request #266 by maudineormsby (2013-03-14 05:08:56+00:00)
Title: Make appium accept selenium's args for execute script

If you make a call something like:

web_element = driver.find_element_by_something('element')
execute_script('arguments[0].scrollIntoView(true);', web_element)

Selenium will proxy the 'web_element' as [{'ELEMENT': elementId}].

Appium cannot handle this response, as it needs to convert the elementId into a wde value for the remote webdriver. This change does that.

Please review:

ios.js:891 and following. Not sure how to handle a callback in a loop.
webview.js:320 - what's a better way to check for an error here (more specifically)? I noticed that it's not raising the error in the callback in ios.js:891.

I leave making appium handle the response with a web element to someone else (probably future Jason, who's already pissed that I'm not doing it).