Hai monks.

I have the following code to login into server.

use Win32::GuiTest qw(FindWindowLike GetListText MouseClick PushButton + PushChildById GetChildWindows SetFocus SelListViewItemText SelTabIte +mText GetFocus WaitWindow SendKeys GetFocus PushChildButton); system('"start %windir%\system32\mstsc.exe"'); $Win32::GuiTest::debug = 0; $max_Sleep_time=5; WaitWindow("Remote Desktop Connection",$max_Sleep_time); @windows = FindWindowLike(0, "Remote Desktop Connection"); for (@windows) { $fc_hwnd = GetFocus( $_ ); SendKeys($fc_hwnd ,"Server_name"); PushChildButton( $_, 1); $max_Sleep_time=20; WaitWindow("Windows Security",$max_Sleep_time); @windows_seq = FindWindowLike(0, "Windows Security"); for (@windows_seq) { PushChildButton( $_, "Use another account"); SelTabItemText( $_, "Use another account"); SelListViewItemText( $_, "Use another account"); @wnds = GetChildWindows($_); PushButton("Use another account"); MouseClick("Use another account",$_); $f=$_; for(@wnds) { $txt = GetListText($f,$_); print "$txt : $_\n"; MouseClick( $_ ,$f); sleep(2); } #--$fc_hwnd = GetFocus( $_ ); #--SendKeys($fc_hwnd ,"Password01"); #--PushChildButton( $_, "OK"); } }


After providing the server name, the connect button is clicked and the windows security window is opened. In this window there are two options, The first one is With my user name(Pradeep) and the other is "Use another account". By default the focus and the cursor is at the password box of the first option. I want to login with the other user credentials so want to click on "Use another account" to this I have used so many functions individually i the program above (For my convenience I have put all the functions in the code given above), But none of the functions were successful in clicking the "Use another account" option.

Please Help me out in solving this problem.

Thanks in advance.

Pradeep Krishna :)


In reply to How to perform click operation on 'Use another account' Option in the 'Windows Security' Window which popups in 'Remote Desktop Connection' process? by pradeep,krishna

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.