Closed
Bug 845805
Opened 12 years ago
Closed 12 years ago
Add a By class to the marionette python bindings
Categories
(Remote Protocol :: Marionette, enhancement)
Remote Protocol
Marionette
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla25
People
(Reporter: Bebe, Assigned: Bebe)
Details
(Whiteboard: [good first bug][mentor=automatedtester][lang=py])
Attachments
(1 file, 3 obsolete files)
19.12 KB,
patch
|
automatedtester
:
review+
|
Details | Diff | Splinter Review |
It would be nice to have access to a By class similar to the one found in the Selenium Python bindings.
Selenium class:
http://selenium.googlecode.com/svn/trunk/docs/api/py/_modules/selenium/webdriver/common/by.html#By
This class will abstract all the selector types and will help us write locators in a more elegant and easy way.
Updated•12 years ago
|
Whiteboard: [good first bug][mentor=automatedtester][lang=py]
Comment 1•12 years ago
|
||
If we add a class to http://mxr.mozilla.org/mozilla-central/source/testing/marionette/client/marionette/ then we should be able to do this. The class just removes the potential issue with people putting their own strings in.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → florin.strugariu
Assignee | ||
Comment 2•12 years ago
|
||
I added the requested class
Attachment #718997 -
Flags: review?(dburns)
Comment 3•12 years ago
|
||
This looks ok, can you update some of the tests so I can push this to try for you and see if it works when being referenced from other files
Comment 4•12 years ago
|
||
I don't think we can take a copyrighted file, reproduce it exactly, but change the license header to ours. If we want this file, we should just copy it exactly (including license notices) from upstream.
Comment 5•12 years ago
|
||
Agreed with Jonathan terms 3 of Apache License for Distribution.
"You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works"
Assignee | ||
Comment 6•12 years ago
|
||
Sorry for this mistake guys I will update my patch.
Assignee | ||
Comment 7•12 years ago
|
||
I took a better look at the binding sand I found https://hg.mozilla.org/integration/mozilla-inbound/file/9a8d04f67e39/testing/marionette/client/marionette/marionette.py#l21
What I'm asking is implemented in the HTMLElement and used in https://hg.mozilla.org/integration/mozilla-inbound/file/9a8d04f67e39/testing/marionette/client/marionette/test_protocol.py#l46
I think this is a bad implementation because you would get access to all the methods in that class witch are not usable.
Comment 8•12 years ago
|
||
:bebe
Please create the file, according to feed back above.
(In reply to Florin Strugariu [:Bebe] from comment #7)
> What I'm asking is implemented in the HTMLElement and used in
> https://hg.mozilla.org/integration/mozilla-inbound/file/9a8d04f67e39/testing/
> marionette/client/marionette/test_protocol.py#l46
I think a better implementation is with a By too since HTMLElement.ID is ambiguous. Is it the mechanism to find or is it the elements ID. Please copy the Selenium file, licence and all, and update some tests so that we know that the egg is packaging them properly
Assignee | ||
Comment 9•12 years ago
|
||
I updated the license and modified the tests
Attachment #718997 -
Attachment is obsolete: true
Attachment #718997 -
Flags: review?(dburns)
Attachment #721133 -
Flags: review?
Updated•12 years ago
|
Attachment #721133 -
Flags: review? → review?(dburns)
Comment 10•12 years ago
|
||
Comment on attachment 721133 [details] [diff] [review]
Parch version 1.1
>
> class By(object):
> ID = "id"
> XPATH = "xpath"
> LINK_TEXT = "link text"
> PARTIAL_LINK_TEXT = "partial link text"
> NAME = "name"
Please can we add the values and not just the top five. Also can you please update a few other test files, 2 files of your choosing.
Attachment #721133 -
Flags: review?(dburns) → review-
Assignee | ||
Comment 11•12 years ago
|
||
Attachment #771285 -
Flags: review?(dburns)
Assignee | ||
Updated•12 years ago
|
Attachment #721133 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #771285 -
Flags: review?(dburns)
Assignee | ||
Comment 12•12 years ago
|
||
Attachment #771285 -
Attachment is obsolete: true
Attachment #771289 -
Flags: review?(dburns)
Comment 13•12 years ago
|
||
Updated•12 years ago
|
Attachment #771289 -
Flags: review?(dburns) → review+
Comment 14•12 years ago
|
||
Comment 15•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•