WWW::Mechanize click($button) not finding right button to click
From: Bart Swordfish (anotheruser_at_comast.net)
Date: 06/17/04
- Next message: Becky Alcorn: "New module: CGI::Tooltip"
- Previous message: Gunnar Hjalmarsson: "Re: instance of class into sub?"
- Next in thread: Gisle Aas: "Re: WWW::Mechanize click($button) not finding right button to click"
- Reply: Gisle Aas: "Re: WWW::Mechanize click($button) not finding right button to click"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 17 Jun 2004 02:19:21 GMT
Based on wise advice from participants of this forum, I rewrote my web
automation script using WWW::Mechanize. The script now successfully
logs into a secure site over https using a simple username password
scheme. I am able to follow links and retrieve various pages. I am
now at the point where I need to fill out a form and submit.
I have all the necessary field filled out but click($button) keeps
saying it can't find the button (there are 8 of them on the page).
The value of $button is "View Tabular Data" which is the "alt=" name
for a button img. It is the only button of that name on the page so
it should find it.
I should point out that I am using WWW::Mechanize for windows that I
got from ActiveState. This mod is version 0.72 which does not include
the submission method of click_button(). I have not been successful
finding the latest version of this mod for Windows (if you know where
I can find version 1.02 compiled for Windows, let me know).
Also, when I was writing the code to automate the secure login, I had
specified the name of the login button: click("Sign In").
Originally, that approach didn't work. Since it was the only button
on the page, I removed the button name: click(). Everything worked
fine after that. Unfortunately, in the case of this final page, 8
buttons leaves me choice...I have to pass a button name. I do have
the option to pass X and Y coordinates but have no idea how those
coordinates are determined.
Anyone ever figure out a way around the multi-button problem? Anyone
else have problems with click($button) not liking button names? Any
ideas how to get this final piece to work?
Thanks in advance
- Next message: Becky Alcorn: "New module: CGI::Tooltip"
- Previous message: Gunnar Hjalmarsson: "Re: instance of class into sub?"
- Next in thread: Gisle Aas: "Re: WWW::Mechanize click($button) not finding right button to click"
- Reply: Gisle Aas: "Re: WWW::Mechanize click($button) not finding right button to click"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]