in reply to Re: Selenium::Firefox: problem finding a child_element
in thread Selenium::Firefox: problem finding a child_element
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Selenium::Firefox: problem finding a child_element
by kcott (Archbishop) on Dec 22, 2015 at 17:00 UTC | |
by samberman (Novice) on Dec 22, 2015 at 19:16 UTC | |
by Anonymous Monk on Dec 22, 2015 at 21:33 UTC |