Thank you, Ken and everyone who responded. Ken, you had the answer. I tried my $child = $firefox->find_child_element($elem, "./select/option[\@value='50']"); and then a call to mouse_move_to_location and then to click and when I then retrieved the contents again, the 50 was selected. Thank you.
Note that if you inspect the element rather viewing the source, you'll be able to see what I represented -- which is also found in the $content variable
I have yet another, similar problem (to select an option which, in this case is part of an html "li" child element. Maybe you can help. The html is:
and I want to select the "Near Mint" selection. I can find the "listOfChoices" element. I am (as you can tell) not familiar with xpath, but reading through it.<ul class="listOfChoices"> <li style="display:none" class="clear-filter"><a onclick=" +clearFilter('Condition', 67287, 'yugioh')" href="javascript:void(0)"> +Clear</a></li> <li class=""> <a onclick="changeFilter('Condition', 'NearMint', +67287, 'yugioh')" href="javascript:void(0)"> <span class="option"></span> Near Mint </a> </li> <li class=""> <a onclick="changeFilter('Condition', 'LightlyPlay +ed', 67287, 'yugioh')" href="javascript:void(0)"> <span class="option"></span> Lightly Played </a> </li> ….
Also, how does one print an element?
In reply to Re^2: Selenium::Firefox: problem finding a child_element
by samberman
in thread Selenium::Firefox: problem finding a child_element
by samberman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |