I see, you need all the values instead of just the selected ones. On Mon, Apr 12, 2010 at 3:46 AM, Jonathan Share <[email protected]> wrote:
> By my understanding of the documentation they only return the > *selected* values. I need to know all of the possible values. > > For now I have worked around the issue with a runScript command. > > On 11 April 2010 09:51, Jian Fang <[email protected]> wrote: > > Hi, > > > > After I checked Selenium Core and Tellurium DSL, seems the following > methods > > have already been provided: > > > > //return an array of all selected option values in the specified select > > drop-down > > > > String[] getSelectedValues(String uid) ; > > > > //return the selected option value in the specified select drop-down > > String getSelectedValue(String uid) ; > > > > Can you try them? > > > > Thanks, > > > > Jian > > On Fri, Apr 9, 2010 at 8:00 AM, Jonathan Share <[email protected]> > wrote: > >> > >> Hi, > >> > >> Would it be possible to get a method similar to getSelectOptions() > >> that returns all of the available values in a Selector? > >> > >> The reason I'm asking is that I have the following html; > >> > >> <select name="seat"> > >> <option value="NONE">Choose seat</option> > >> <option value="CC9">Restaurant</option> > >> <option value="BC6">Business</option> > >> <option value="VC4">Voyager</option> > >> <option value="VCH2">Voyager Wheelchair</option> > >> <option value="DS7">No Allocated</option> > >> </select> > >> > >> Under certain conditions the number at the end of the values changes > >> (and the application is localised so the text in the label will also > >> change). One possible solution would be to add attribute partial > >> matching to selectByValue (similar to that I requested for > >> selectByLabel in issue #293) then I could do selectByValue("seat", > >> "^CC") however I have a problem when I get to the VC option as that > >> would match both VC4 and VCH2. Therefore I would like to be able to > >> write the following; > >> > >> def seatType = "VC" // test parameter > >> getSelectValues("seat").each {value -> > >> if (value ==~ "${seatType}\\d") { > >> selectByValue "seat", value > >> } > >> } > >> > >> Does this seem sensible? Are there any other possible workarounds to > >> select this value (other than running javascript directly)? > >> > >> Regards, > >> > >> Jonathan > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "tellurium-users" group. > >> To post to this group, send email to [email protected]. > >> To unsubscribe from this group, send email to > >> [email protected]<tellurium-users%[email protected]> > . > >> For more options, visit this group at > >> http://groups.google.com/group/tellurium-users?hl=en. > >> > > > > -- > > You received this message because you are subscribed to the Google Groups > > "tellurium-users" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<tellurium-users%[email protected]> > . > > For more options, visit this group at > > http://groups.google.com/group/tellurium-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "tellurium-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<tellurium-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tellurium-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "tellurium-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en.
