$elem = FindElement(using => 'xpath', value => 'state');
$x = FindElementFromElement(using => 'xpath', value => q{option[text()='New York'});
$x->ElementClick(); # <- Issues a click on $elem rather than selecting New York.
Changing the to_inject field in $x to reference the element-id for $x causes "New York" to be selected from the drop down.
$elem = FindElement(using => 'xpath', value => 'state'); $x = FindElementFromElement(using => 'xpath', value => q{option[text()='New York'}); $x->ElementClick(); # <- Issues a click on $elem rather than selecting New York.
Changing the to_inject field in $x to reference the element-id for $x causes "New York" to be selected from the drop down.