Closed CS00460960 closed 5 years ago
Please Check html format for details
There's not enough context here for me to say whether this is a bug or a problem with your code. Please post enough code for us to reproduce exactly what you're seeing. For instance, it's not clear to me whether you're actually selecting a form, whether there is more than one form on the page, etc.
The best thing you can do is provide enough Perl + HTML so that we can run the same code and see the same problem.
Hi @oalders , I am login to server and go to this HTML Start Stop Control Page Provided below . Under form name "serverControlStartstopForm" there was an dropdown under Shutdown button(When Work Completes) . I need to click this dropdown button
My Code:
use strict;
use warnings;
use Net::OpenSSH;
use WWW::Mechanize;
my $url = "http://p1gio1z9.vci.att.com:40000/console/login/LoginForm.jsp";
my $username = "########";
my $password = "#########";
my $mech = WWW::Mechanize->new();
$mech->cookie_jar( HTTP::Cookies->new() );
$mech->get($url);
print $mech->title() . "\n";
$mech->submit_form(
with_fields => {
"j_username" => $username,
"j_password" => $password,
}
);
$mech->get(
"http://p1gio1z9.vci.att.com:40000/console/console.portal?_nfpb=true&_pageLabel=ServerControlTabcontrolTabPage&handle=com.bea.console.handles.JMXHandle%28%22com.bea%3AName%3D"
. $srv
. "%2CType%3DServer%22%29" );
my $name = 'serverControlStartstopForm';
$mech->form_id($name);
$mech->click_button( name => "Shutdown" );
$mech->click_button( name => "When Work Completes" );
Html Page: [Html Control Start Stop Page.txt](https://github.com/libwww-perl/WWW-Mechanize/files/2349056/Html.Control.Start.Stop.Page.txt
Sorry I'm just getting back to this. The above code sample wouldn't compile, so I made a few tweaks. $srv
is still not being defined, though.
I'm going to close this ticket as I'm not seeing a bug in the module. Feel free to re-open if you find a bug. Otherwise asking this kind of question on stackoverflow.com is probably the best way to get a fast answer.
Please Check the full code i have attached.. Every variable is defined Mech Click issue.txt
Hi,
I'm trying to click the button using Mechanize Module . It Gives error that NO CLICKABLE INPUT WITH NAME shutdown at /home/(moodule path/ at line no: ..
Please Help. If there are any other way to click this dropdown . Please Suggest
HTML page:
My Code: