Guest User

Untitled

a guest
Jun 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. my $form = HTML::Form->parse($mech->response);
  2.  
  3. my $dropdown = $form->find_input('DropdownName');
  4.  
  5. my @labels = $dropdown->value_names;
  6. my @values = $dropdown->possible_values;
  7.  
  8. # The above works perfectly for fetching a list of values and labels,
  9. # but for each entry in the drop-down, I need to know which <optgroup>
  10. # it's in. HTML::Form doesn't appear to provide that info...
Add Comment
Please, Sign In to add comment