Hello all:
I have a problem in locating a value of the drop down. The scene is as
follows:
1. I want to select an option of the drop down dynamically.
2. Option ids and titles are dynamically generated.
Code:
select id=existingAlbum
option selected=selectedSelect Existing Album/option
On Thu, May 12, 2011 at 9:27 AM, Amit Bobade amit.sr...@gmail.com wrote:
So, I have to select one of the options dynamically.
What do you mean by dynamically? How do you know what to select when you
are doing it manually?
Željko
--
watir.com - community manager
watir.com/book - author
Thanks for replying mate.
I have a drop down having some values. Now I want to select one of the
values at random (Not dynamically. sorry and thanks).
Please suggest.
Thanks,
Amit
*
*
On Thu, May 12, 2011 at 1:48 PM, Željko Filipin
zeljko.fili...@wa-research.ch wrote:
On Thu, May 12, 2011 at
On Thu, May 12, 2011 at 10:29 AM, Amit Bobade amit.sr...@gmail.com wrote:
Now I want to select one of the values at random
Random is another story. :)
Getting a random number is Ruby feature, does not have anything to do with
Watir, for example:
Yes you are right. But my problem is ids and names are dynamically generated
in the drop down. I want to select one of them.
Please tell me how to select one of the options among- Nature Picures, Test
123 adn Pictures. And these are dynamically generated.
option id=1254542 name=profile
On Thu, May 12, 2011 at 10:43 AM, Amit Bobade amit.sr...@gmail.com wrote:
Or is there any method or way to get the contents of the drop down?
Sure.
browser.select_list(how, what).getAllContents
http://rdoc.info/gems/watir/1.8.1/Watir/SelectList#getAllContents-instance_method
Željko
--
Thanks for your help mate. :)
On Thu, May 12, 2011 at 2:18 PM, Željko Filipin
zeljko.fili...@wa-research.ch wrote:
On Thu, May 12, 2011 at 10:43 AM, Amit Bobade amit.sr...@gmail.com
wrote:
Or is there any method or way to get the contents of the drop down?
Sure.
browser.select_list(how,