garo has asked for the wisdom of the Perl Monks concerning the following question:
I use WWW::Mechanize::Chrome but I can't manage to write in a <input>-field that's not inside a form.
According to the docs I need the set_field() method.
Maybe it also works with the get_set_value() method but I have no idea here either...
If we assume that the only thing I know about the input-field is that it has the attribute id="foo" and that their is only one of these fields, how can I do this ?
The only progress I made so far is that I managed to create a WWW::Mechanize::Chrome::Node object with $node = $mech->xpath('//input[@id="foo"]', single => 1);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to write in a non-form field of which the xpath is known using WWW::Mechanize::Chrome ?
by Corion (Patriarch) on Jan 08, 2026 at 08:23 UTC | |
by garo (Initiate) on Jan 09, 2026 at 11:00 UTC | |
by marto (Cardinal) on Jan 09, 2026 at 12:29 UTC |