Jump to content
Sign in to follow this  
DCAlliances

PDF Save Dialog Box Stop working

Recommended Posts

Hi there

We have a legacy app that utilising this AutoIt/Selenium for automating the web app that have. It's been running well since 2010 late 2014. We stoped a bit on this. Then start again this year.

We have an issue on one of the step which is relating on PDF Save Dialog Box Stop working - basically it won't click to Save button for some reason. We pin point this and we believe it stop at lib.AU3_Send("!S",0); ... line 7 below.

Any ideas?

 

public void SaveDialogueBox(String filePath, String firstName, String lastName) {
        lib.AU3_WinWaitActive("File Download", "", 10);
        lib.AU3_WinActivate("File Download", "");

        // Debug: VV - swap
        // lib.AU3_ControlClick("File Download", "", "[CLASS:Button; INSTANCE:2]","",1, 1, 1);
        lib.AU3_Send("!S", 0);
        

        lib.AU3_WinWaitActive("Save As", "", 10);
        lib.AU3_Sleep(500);
        lib.AU3_Send(filePath + firstName + " " + lastName, 1);
        lib.AU3_Sleep(2000);
        if (reader.getWindowVersion().equals("Windows Vista or Windows 7")) 
        {
            //lib.AU3_ControlClick("Save As", "", "[CLASS:Button; INSTANCE:1]","",1, 1, 1);
            lib.AU3_Send("!S", 0);
        }
        else 
        {
            lib.AU3_ControlClick("Save As", "", "[CLASS:Button; INSTANCE:2]","",1, 1, 1);
        }
        lib.AU3_WinWaitActive("Download complete", "", 10);
        lib.AU3_Sleep(2000);
        lib.AU3_ControlClick("Download complete", "", "[CLASS:Button; INSTANCE:4]","",1, 1, 1);
        lib.AU3_WinActivate("[REGEXPTITLE:.*EUC .*]", "");
    }

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By shelly
      I have to press tab to reach a selected button then double click on that
      Here's my script but its not working:
      WinActivate("Policy Decisions -- Webpage Dialog","")
      Sleep(3000)
      Send("{TAB}")
      Send("{TAB}")
      Send("{TAB}")                    // at this point its working according to my need  but double click is not working
      Mouseclick("Left",510, 320, 2, 0)

    • By TheDcoder
      See this thread for info:
    • By nooneclose
      Why can I not click on either of my input fields?
      #Region ### START Koda GUI section ### Form= Global $Form1 = GUICreate("Form1", 730, 437, 192, 124) ;GUISetFont(14, 800, 0, "MS Sans Serif") GUISetBkColor(0xC0DCC0) Global $Label1 = GUICtrlCreateLabel("Enter your Password. UserName is auto filled", 62, 40, 604, 41, $SS_CENTER) GUICtrlSetFont(-1, 26, 800, 0, "MS Sans Serif") Global $Label2 = GUICtrlCreateLabel("User Name:", 120, 130, 604, 31, $SS_LEFT) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") Global $Label3 = GUICtrlCreateLabel("Password:", 135, 210, 604, 31, $SS_LEFT) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") Global $Input1 = GUICtrlCreateInput(@UserName, 274, 130, 185, 32) GUICtrlSetFont(-1, 14, 800, 1, "MS Sans Serif") Global $Input2 = GUICtrlCreateInput("Password", 274, 210, 185, 32, $ES_PASSWORD) GUICtrlSetFont(-1, 14, 800, 0, "MS Sans Serif") Global $OK = GUICtrlCreateButton("OK", 274, 270, 185, 57) GUICtrlSetFont(-1, 20, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK Global $UserName = GUICtrlRead($Input1) Global $PassWord = GUICtrlRead($Input2) ExitLoop EndSwitch WEnd ; Delete the GUI window GUIDelete()  
    • By cruisepandey
      Hi, 
      I have a string like this : 
      Global $Msga = "urrent directory is /send.  (Submission of file with log number 29381077284 is confirmed)";
      I want to extract the number 29381077284  from the string. I did StringSplit to split based on "(" and then use space to reach there, But it's not a good choice. 
      Can anyone help me with regular expression to find the number from String using AutoIT. TIA
×
×
  • Create New...