Closed
Bug 488743
Opened 15 years ago
Closed 15 years ago
Mozmill Cannot Automate Selection on a XUL menulist element
Categories
(Testing Graveyard :: Mozmill, defect, P1)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: cmtalbert, Assigned: whimboo)
References
Details
(Whiteboard: [verified-mozmill-1.2])
Attachments
(3 files)
1.55 KB,
text/plain
|
Details | |
1.74 KB,
application/x-javascript
|
Details | |
1.29 KB,
patch
|
Details | Diff | Splinter Review |
<menulist> elements can be used to create a drop down selection list. The code in Mozmill is currently written against <option> elements in HTML and does not work for <menulist> elements. We need a new set of controller functions to select items from <menulist> elements. I'll attach a test where I have to simulate key commands in order to make the menulist item work. That is the only work around, and it's not entirely clear that the work around is viable because sometimes the ending <enter> keypress event gets targeted elsewhere than the menulist, causing other behaviors in the system.
We really really need this for 1.2.
Priority: -- → P1
Whiteboard: [mozmill-1.2]
Assignee | ||
Updated•15 years ago
|
Hardware: x86 → All
Assignee | ||
Comment 2•15 years ago
|
||
Here the modified test which uses the not working select function.
Comment 3•15 years ago
|
||
I think we should just check the tagname on the element passed and ifdef this in the select API instead of writing a new API for menulist.
Hardware: All → x86
Assignee | ||
Updated•15 years ago
|
Hardware: x86 → All
Comment 4•15 years ago
|
||
Looks like <menulist> works a bit differently than <options>, adam will have to take a deeper look at this. https://developer.mozilla.org/en/XUL/menulist
Comment 5•15 years ago
|
||
Committed revision 467. This now works: var mozmill = {}; Components.utils.import('resource://mozmill/modules/mozmill.js', mozmill); var elementslib = {}; Components.utils.import('resource://mozmill/modules/elementslib.js', elementslib); var setupModule = function(module) { module.controller = mozmill.getBrowserController(); } var testPrivacyPanel = function(){ // load pref pane prefcontroller = mozmill.getPreferencesController(); // load the privacy panel prefcontroller.click(new elementslib.Lookup(prefcontroller.window.document, '/id("BrowserPreferences")/anon({"orient":"vertical"})/anon({"anonid":"selector"})/{"pane":"panePrivacy"}')); // Let the UI catch up to us //prefcontroller.sleep(400); prefcontroller.waitForElement(new elementslib.ID(prefcontroller.window.document, "locationBarSuggestion")); // twiddle the drop down histDropDown = new elementslib.ID(prefcontroller.window.document, "locationBarSuggestion"); prefcontroller.select(histDropDown, null, "Bookmarks", null); prefcontroller.click(histDropDown); prefcontroller.keypress(histDropDown, 40, 0, {}); prefcontroller.keypress(histDropDown, 40, 0, {}); prefcontroller.keypress(histDropDown, 0, 13, {}); controller.assertNode(new elementslib.ID(prefcontroller.window.document, "rememberDownloads")); controller.assertNode(new elementslib.ID(prefcontroller.window.document, "rememberForms")); controller.assertNode(new elementslib.ID(prefcontroller.window.document, "acceptCookies")); controller.assertNode(new elementslib.ID(prefcontroller.window.document, "alwaysClear")); controller.assertNode(new elementslib.ID(prefcontroller.window.document, "clearDataSettings")); }
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 6•15 years ago
|
||
It's not possible to select the first index or option due to a failure in the parameter checks. I'll attach a patch. Reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 7•15 years ago
|
||
Attachment #380648 -
Flags: review?(adam.christian)
Comment 8•15 years ago
|
||
Comment on attachment 380648 [details] [diff] [review] Follow-up patch for index/option zero Looks good to me, will go ahead and apply this.
Comment 9•15 years ago
|
||
Comment on attachment 380648 [details] [diff] [review] Follow-up patch for index/option zero Looks good to me, will go ahead and apply this.
Comment 10•15 years ago
|
||
Committed revision 471.
Comment 11•15 years ago
|
||
Believe this is now done, marking fixed.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•15 years ago
|
Attachment #380648 -
Flags: review?(adam.christian)
Assignee | ||
Comment 12•15 years ago
|
||
Ok, we have to reopen this bug for at least one more fix. We should not check for undefined as what I proposed in my last patch. We should do something like "if (indx >= 0)" for all those if constructs. Adam can you fix that?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 13•15 years ago
|
||
Took Henrik's latest suggestion. Fixed.
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 14•15 years ago
|
||
Two checkins were needed because we also have to check value and option. Both landed with: http://code.google.com/p/mozmill/source/detail?r=485 http://code.google.com/p/mozmill/source/detail?r=486 That should be fine now. Thanks Mikeal.
Status: RESOLVED → VERIFIED
Whiteboard: [mozmill-1.2] → [verified-mozmill-1.2]
Assignee | ||
Comment 15•15 years ago
|
||
We checked in a further patch which doesn't use tagName anymore which depends on the given namespace. localName is the way we should go. http://code.google.com/p/mozmill/source/detail?r=506 Further note that we cannot automate menulist elements when they are childrens of a panel element. See bug 443155.
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → hskupin
Updated•8 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•