controller.select function misses index parameter

VERIFIED FIXED

Status

Testing Graveyard
Mozmill
VERIFIED FIXED
9 years ago
2 years ago

People

(Reporter: whimboo, Unassigned)

Tracking

Dependency tree / graph

Details

(Whiteboard: [mozmill-docneeded])

(Reporter)

Description

9 years ago
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090130 Shiretoko/3.1b3pre Ubiquity/0.1.5 ID:20090130030519 and MozMill 1.0.2

Selecting a given entry of a select element isn't possible at the moment. Seems like the second parameter is missing. You can only supply the element.

let option = new elementslib.ID(controller.tabs.activeTab, "test"); controller.select(option);

That makes this function useless. Please add a parameter for the index selection.
(Reporter)

Updated

9 years ago
Depends on: 476236
(Reporter)

Updated

9 years ago
Blocks: 476236
No longer depends on: 476236

Comment 1

9 years ago
Committed revision 332.

Now this takes 3 params:
controller.select(new elementslib.Name(controller.tabs.activeTab, "cars"), index, option, value)

Leave any you want to ignore as null.
No longer blocks: 476236
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
(Reporter)

Comment 2

9 years ago
Thanks Adam! But in your last comment I can see 4 params. Can you please describe them in detail? Do we have updated documentation on that?
Blocks: 476236, 476171

Comment 3

9 years ago
Right so params:
elementslib object - required
index - the drop down index you would like to select, if you don't want to use an index use null
option - the innerHTML of the option in the drop down (the visible string), again use null if this isn't what you want
value -- options have a value attribute which is what actually gets sent by the form, since its the last param use null or simply leave it out if it isn't what you wanted.

If you provide more then one of the last 3 params it will try them all until one succeeds.

This is new to the API, and needs to be documented.
(Reporter)

Comment 4

9 years ago
(In reply to comment #3)
> This is new to the API, and needs to be documented.

Can someone please do that?

The rest works fine with my new amazon.com test. Thanks Adam.
Status: RESOLVED → VERIFIED

Comment 5

9 years ago
(In reply to comment #4)
> (In reply to comment #3)
> > This is new to the API, and needs to be documented.
> 
> Can someone please do that?
I'll add the [mozmill-docneeded] flag to the whiteboard for these.  I'll query them and write the docs later this week.  Feel free to add it to other things we need to document.
Whiteboard: [mozmill-docneeded]
(Assignee)

Updated

2 years ago
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.