Hi! i am automating one web application using perl and selenium which works irrespective of browser. As the selenium is built to work entirely on web technology,it can not handle dialog box or save as window. so autoit is the tool which is used to handle dialog box. here is the autoit script which handles dialog box.

f $CmdLine[0] < 2 then ; Arguments are not enough msgbox(0,"Error","Supply all the Arguments, Dialog title,Save/Cancel a +nd Path to save(optional)") Exit EndIf ; wait until dialog box appears WinWait($CmdLine[1]) ; match the window with substring $title = WinGetTitle($CmdLine[1]) ; retrives whole window title WinActive($title); ; if user choose to save file If (StringCompare($CmdLine[2],"Save",0) = 0) Then WinActivate($title) WinWaitActive($title) Sleep(1) ; If firefox is set the save the file on some specif location without +asking to user. ; It will be save after this point. ;If not A new Dialog will appear prompting for Path to save Send("{ENTER}") if ( StringCompare(WinGetTitle("[active]"),$title,0) = 0 ) Then WinActivate($title) Send("{ENTER}") EndIf if WinExists("Enter name") Then $title = WinGetTitle("Enter name") if($CmdLine[0] = 2) Then ; Save File WinActivate($title) ControlClick($title,"","Button2") Else ;Set path and save file WinActivate($title) WinWaitActive($title) ControlSetText($title,"","Edit1",$CmdLine[3]) ControlClick($title,"","Button2") EndIf Else ;Firefox is configured to save file at specific location Exit EndIf EndIf ; do not save the file If (StringCompare($CmdLine[2],"Cancel",0) = 0) Then WinWaitActive($title) Send("{ESCAPE}") EndIf
when i call this script through command prompt using : Save_Dialog_FF "dialog_box name" "save" it handles that dialog box. but i have to call this script through perl. can anybody help me out? Thank you.

In reply to How to call AutoIt script from perl by AnujaT

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.