Closed Bug 1141050 Opened 9 years ago Closed 9 years ago

Import marionette.keys.Keys into marionette namespace

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ato, Unassigned, Mentored)

Details

(Keywords: pi-marionette-client, Whiteboard: [good first bug][lang=py])

Attachments

(2 files)

The marionette.keys.Keys class should be imported into the marionette namespace alongside other utility packages: http://hg.mozilla.org/mozilla-central/file/eab4a81e4457/testing/marionette/driver/marionette_driver/__init__.py

This will make it possible to use the import statement:

    from marionette import Keys

Instead of:

    from marionette.keys import Keys
Whiteboard: [good first bug][lang=py][mentor=ato]
Mentor: ato
Whiteboard: [good first bug][lang=py][mentor=ato] → [good first bug][lang=py]
Hi~ I'm very interesting in this bug and I have experience to make contribution to Mozilla. Could you give this bug to me? Thanks a lot :-)
MikeLing: Assigned it to you.  I'm known as ato in #ateam on irc.mozilla.org if you need any help.
Assignee: nobody → sabergeass
Status: NEW → ASSIGNED
Attachment #8600548 - Flags: review?(ato)
Comment on attachment 8600548 [details] [diff] [review]
bug-1141050-fix.patch

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

Did you check that this patch actually works?  AFAIK "marionette" isn't our module and it especially isn't one that contains the class Keys.

I think what you want to do here is:

    from marionette_driver.keys import Keys
Attachment #8600548 - Flags: review?(ato) → review-
(In reply to Andreas Tolfsen (:ato) from comment #4)

Sorry, could you tell me how to test my work before I commit this patch? Build all mozilla source code is a hard work for me. Thank you :)
(In reply to MikeLing from comment #5)
> (In reply to Andreas Tolfsen (:ato) from comment #4)
> 
> Sorry, could you tell me how to test my work before I commit this patch?
> Build all mozilla source code is a hard work for me. Thank you :)

You need to set your Python path so that the development version of marionette_driver is pulled in when you import marionette_driver.

Typically you'd do this by creating a virtualenv, activating that, and calling `python setup.py develop` in testing/marionette/driver.
Hmm, I open a python shell and "import marionette_driver" and it seems works well. I hope this patch will work:)
Attachment #8600900 - Flags: review?(ato)
That looks good to me, but can you please generate a patch file instead of a diff?

See this about how a commit message should look:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Committing_Rules_and_Responsibilities
(In particular you need to include r=ato to indicate I approved it.)
(In reply to Andreas Tolfsen (:ato) from comment #8)
Sorry, I can't find my patch file after I type "hg qnew name.patch". Could you tell me how could I give the patch file to you? Thanks!
(In reply to MikeLing from comment #9)
> (In reply to Andreas Tolfsen (:ato) from comment #8)
> Sorry, I can't find my patch file after I type "hg qnew name.patch". Could
> you tell me how could I give the patch file to you? Thanks!

If you commit your changes on your patch queue, you can do `hg export -o FILE -r REV`, where REV is the last commit ID or SHA.  You can find that if you look at `hg log -r.`.
(In reply to Andreas Tolfsen (:ato) from comment #10)

The information in FILE is:
> # HG changeset patch
> # User MikeLing <sabergeass@gmail.com>
> # Date 1430817526 -28800
> #      Tue May 05 17:18:46 2015 +0800
> # Node ID 3ba606a3e3c1bc0a24c38711a03062c96c0a048c
> # Parent  c63234b1e62c36a4f20b1d9e192df4a1a30f780c
> [mq]: fix_1141050.patch

What should I do next?
Can you paste FILE/fix_1141050.patch somewhere?
(In reply to Andreas Tolfsen (:ato) from comment #12)
> Can you paste FILE/fix_1141050.patch somewhere?

No, I can't because FILE isn't a directory.

First of all, I type ' hg qseries -v -s' and it's return:
> 0 A bug-1141050-fix: Bug 1141050: Import marionette.keys.Keys into marionette...
> 1 A fix_1141050.patch: 

Then, I type `hg export -o FILE -r fix_1141050.patch`

But FILE which this order generate a file named FILE not a directory.
(In reply to Andreas Tolfsen (:ato) from comment #12)
> Can you paste FILE/fix_1141050.patch somewhere?

Maybe we could talk about this on IRC :)
Comment on attachment 8600900 [details] [diff] [review]
bug-1141050-fix-V2.patch

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

Yes we can.
Attachment #8600900 - Flags: review?(ato) → review-
Since there hasn't been movement on this bug, can this be marked as open? Also what are the other utility packages apart from Keys?

Are these all the utility packages? 

errors, by, decorators, expected, geckoinstance,
gestures, keys, marionette, selection, wait,
application_cache, date_time_value 


From: http://hg.mozilla.org/mozilla-central/file/eab4a81e4457/testing/marionette/driver/marionette_driver/__init__.py
Sure(In reply to Andrew from comment #16)
> Since there hasn't been movement on this bug, can this be marked as open?

Sure! sorry for later reply, I would like to unassigned this bug from myself and let other people who want this to take it :)
Assignee: sabergeass → nobody
Status: ASSIGNED → NEW
Actually, looking at the remainder of the package namespace the current approach does make sense and harmonises with what Selenium is doing.  I'm going to close this bug in order not to create more inconsistency.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: