Closed Bug 754278 Opened 12 years ago Closed 12 years ago

Arguments passed in via executeScript or executeAsyncScript fail as they don't support floats

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla15

People

(Reporter: automatedtester, Assigned: automatedtester)

Details

Attachments

(1 file, 1 obsolete file)

Selenuim Proxy was not able to execute this script, log below, because it passes in a float

2012-05-11 13:38:32,989 - Selenium-Proxy - INFO - Navigating to http://localhost:8019/javascriptPage.html - 13
2012-05-11 13:38:33,090 - Selenium-Proxy - DEBUG - /execute - {u'sessionId': u'13', u'args': [1.2], u'script': u'return arguments[0]'} - 13 - None
2012-05-11 13:38:33,090 - Selenium-Proxy - INFO - Executing Script - 13
2012-05-11 13:38:33,090 - Selenium-Proxy - CRITICAL - Server Exception: Traceback (most recent call last):
  File "selenium_proxy.py", line 221, in do_POST
    result = self.server.marionette.execute_script(body['script'], script_args=body['args'])
  File "/Users/davidburns/.virtualenvs/seleniumproxy/lib/python2.7/site-packages/marionette-0.2-py2.7.egg/marionette/marionette.py", line 327, in execute_script
    args = self.wrapArguments(script_args)
  File "/Users/davidburns/.virtualenvs/seleniumproxy/lib/python2.7/site-packages/marionette-0.2-py2.7.egg/marionette/marionette.py", line 283, in wrapArguments
    wrapped.append(self.wrapArguments(arg))
  File "/Users/davidburns/.virtualenvs/seleniumproxy/lib/python2.7/site-packages/marionette-0.2-py2.7.egg/marionette/marionette.py", line 294, in wrapArguments
    return wrapped
UnboundLocalError: local variable 'wrapped' referenced before assignment
OS: Mac OS X → All
Hardware: x86 → All
Assignee: nobody → dburns
Attached patch add float check (obsolete) — Splinter Review
Attachment #623139 - Flags: review?(jgriffin)
Comment on attachment 623139 [details] [diff] [review]
add float check

Thanks!  Does this change allow the float test to pass?
Attachment #623139 - Flags: review?(jgriffin) → review+
Attachment #623139 - Attachment is obsolete: true
Attachment #624140 - Flags: review?(jgriffin)
Comment on attachment 624140 [details] [diff] [review]
Have added a test for new code

Perfect, thanks.  Shall I land this in m-c and mirror to github?
Attachment #624140 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/e9d5cc8e4559
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: