Closed Bug 757069 Opened 8 years ago Closed 8 years ago

getSessionCapabilities raises MarionetteException: unrecognizedPacketType

Categories

(Testing :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla17

People

(Reporter: andrzej.j.skalski, Assigned: automatedtester)

References

Details

Attachments

(1 file)

Hi,

here is some output from interactive run (Firefox with marionette is up and running via MozRunner and MozProfile in background). m.window* calls are not relevant, but gives weird results, so I decided to post them as well.

    >>> m
    <marionette.marionette.Marionette object at 0x013188B0>
     
    >>> m.window()
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
    TypeError: 'NoneType' object is not callable
     
    >>> m.window
     
    >>> m.get_session_capabilities()
    Traceback (most recent call last):
      File "<console>", line 1, in <module>
      File "E:\mozbase-win32\lib\site-packages\marionette-0.2-py2.7.egg\marionette\m
    arionette.py", line 225, in get_session_capabilities
        response = self._send_message('getSessionCapabilities', 'value')
      File "E:\mozbase-win32\lib\site-packages\marionette-0.2-py2.7.egg\marionette\m
    arionette.py", line 174, in _send_message
        self._handle_error(response)
      File "E:\mozbase-win32\lib\site-packages\marionette-0.2-py2.7.egg\marionette\m
    arionette.py", line 203, in _handle_error
        raise MarionetteException(message=response, status=500)
    MarionetteException: {u'message': u'Actor "conn1.marionette1" does not recognize
     the packet type "getSessionCapabilities"', u'from': u'conn1.marionette1', u'err
    or': u'unrecognizedPacketType'}
Andrzej, can you please make sure to file Marionette bugs into the Marionette component in the future? Thanks.
Component: Mozbase → Marionette
QA Contact: mozbase → marionette
OK, sorry, I used the wrong bugzilla bookmark.
:AutomatedTester, do you have any suggestions on what we should return for session capabilities?  Should we just return an empty object?
I think that we should try return useful information about the browser. e.g. http://code.google.com/p/selenium/source/browse/trunk/javascript/firefox-driver/js/nsCommandProcessor.js#698

This way we can return details of what the Gecko instance is that we are connected to. This might be good if we are running a test, which hopefully would work cross-platform and cross-device, to know what we are connected to, especially on failure.
OS: Linux → All
Hardware: x86_64 → All
Assignee: nobody → dburns
Attachment #650023 - Flags: review?(jgriffin)
Comment on attachment 650023 [details] [diff] [review]
add the ability to get Session data out of the browser to the client code

Review of attachment 650023 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!

::: testing/marionette/client/marionette/tests/unit/test_capabilities.py
@@ +1,5 @@
> +# This Source Code Form is subject to the terms of the Mozilla Public
> +# License, v. 2.0. If a copy of the MPL was not distributed with this
> +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
> +
> +import os

unused import

::: testing/marionette/marionette-actors.js
@@ +385,5 @@
> +          'handlesAlerts': false,
> +          'javascriptEnabled': true,
> +          'nativeEvents': false,
> +          'platform': Services.appinfo.OS,
> +          'rotatable': false,

this should probably be 'rotatable': rotatable, no?
Attachment #650023 - Flags: review?(jgriffin) → review+
https://hg.mozilla.org/mozilla-central/rev/a3f1d6668fcb
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Duplicate of this bug: 763089
You need to log in before you can comment on or make changes to this bug.