Closed Bug 1793312 Opened 4 years ago Closed 4 years ago

Example code on /testing/marionette/PythonTests.html seems broken

Categories

(Remote Protocol :: Marionette, defect)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1793311

People

(Reporter: brewmanz, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

Steps to reproduce:

Copied code from https://firefox-source-docs.mozilla.org/testing/marionette/PythonTests.html being from marionette_test import MarionetteTestCase
Also tried from marionette import Marionette and from marionette import MarionetteTestCase
Note that I did do a pip install Marionette which worked.
Also pip install MarionetteTest and pip install Marionette-Test which failed.

Actual results:

$ python
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

from marionette_test import MarionetteTestCase
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'marionette_test'
from marionette import Marionette
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'Marionette' from 'marionette' (/home/XXXX/.local/lib/python3.8/site-packages/marionette/init.py)
dir(marionette)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'marionette' is not defined
from marionette import MarionetteTestCase
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'MarionetteTestCase' from 'marionette' (/home/bryan/.local/lib/python3.8/site-packages/marionette/init.py)

Expected results:

I was expecting the python code to work.
Maybe some instructions on what to install would be good, if it needs to also be installed.

The severity field is not set for this bug.
:Sylvestre, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(sledru)
Component: Firefox Source Docs: Content → Marionette
Flags: needinfo?(sledru)
Product: Developer Infrastructure → Testing

Lets fix this as part of bug 1793311.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.