okay i have screenshot, this is crazy result

For code :

if ($mech->success()) { $mech->sleep(1); + # waiting for load site $mech->form_number(1); $mech->value( username => $user ); $mech->value( password => $pass ); $mech->sleep(1); show_screen($mech); }

Result image:

https://imgur.com/a/hacCoB0

For code :

if ($mech->success()) { $mech->sleep(1); + # waiting for load site $mech->click({xpath => '//input[@name="username"]', single => +1 }); $mech->sleep(1); $mech->sendkeys( string => "test\r" ); $mech->sleep(1); $mech->click({xpath => '//input[@name="password"]', single => +1 }); $mech->sleep(1); $mech->sendkeys( string => "test\r" ); $mech->sleep(1); show_screen($mech); }

Result image:

https://imgur.com/a/uUcsPi2

The first example shows that the button has not been activated and value are on the label, the label should disappear

Second example shows click not work, input is empty although the rules are correct, the module finds these fields (username and password) Maybe not work sendkeys? Did I write it correctly sendkey function?

HTML code on instagram, input

<input class="_2hvTZ pexuQ zyHYP" aria-label="Phone number, username, +or email" aria-required="true" autocapitalize="off" autocorrect="off" + maxlength="75" name="username" type="text" value=""> <input class="_2hvTZ pexuQ zyHYP" aria-label="Password" aria-required= +"true" autocapitalize="off" autocorrect="off" name="password" type="p +assword" value=""

Why sendkeys not work on this input?


In reply to Re^10: WWW::Mechanize::Chrome Instagram by damian1
in thread WWW::Mechanize::Chrome Instagram by damian1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.