in reply to Re^2: How to write in a non-form field of which the xpath is known using WWW::Mechanize::Chrome ?
in thread How to write in a non-form field of which the xpath is known using WWW::Mechanize::Chrome ?
Corion not only copied the extract from the documentation, as the author of WWW::Mechanize::Chrome he wrote it, and asked you how it could be altered to make its use clearer. Since you already know how to find the element you want to change, simply do what the documentation states in the example provided and set the value:
my ($node) = $mech->xpath('//input[@id="foo"]'); $mech->set_field( field => $node, value => 'Your value here', );
|
|---|