Hi , 

Hope this would help you.

 def textFromDropDown = $('LOCATOR OF DROP-DOWN 
LIST').allElements()*.text() 


Thanks,

Rajarajan C

                

On Thursday, 16 March 2017 22:35:44 UTC+5:30, ADITYA GAURAV wrote:
>
> Hi,
>
> I just got stuck in a scenario where I need to collect all the text values 
> from a drop-down list. WHAT IS THE BEST WAY TO DO THAT? Any help will be 
> really helpful.
>
> def textFromDropDown = $('LOCATOR OF DROP-DOWN LIST').text() 
>
> Will this work? 
> Thanks,
> Aditya
>  
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/86168559-7fc9-4683-81e1-ee036e2d6387%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to