Your skill will accomplish
what the force of many cannot
WWW::Mechanize::Chrome: Click on button not part of a formby stevieb (Canon)
|on Dec 01, 2019 at 14:43 UTC||Need Help??|
stevieb has asked for the wisdom of the Perl Monks concerning the following question:
Greetings fellow Monks,
I've created a small one-page web application and am attempting to use Corion's WWW::Mechanize::Chrome to do some testing. I'm not a web developer, and this is my first attempt at automating anything related to the web.
My problem is that I can't seem to figure out how to click on something (ie. a button) that isn't part of a form. I'm sure I just haven't read through enough of the massive amounts of documentation, but my searching is failing me as well.
I reduced the problem scope to the following:
Both the test-button and the fileupload operations Do The Right Thing in the browser, but fail with mechanize:
Here's just a few things I've tried along with the resulting output:
Can someone please let me know what I'm missing?
On a side note, it would be nice if I could be informed of a way to click on the fileupload input as well, but that one's not even a button so I'm at a further loss :)
PS: It's a crying shame that Mozilla broke things so that WWW::Mechanize::Firefox no longer works. I don't use Chrome normally.