Get Excel Macro to click "yes" in the popup which stop the Macro while it is waiting for the action

  • I am automating some data compilation from reports in the web application of my workplace. The reports are found in different Hubs/Centers which I need to switch from one to the other. I am able to write the Excel Macro to navigate to the webpage to change the Hub/Center but when my code clicks the confirm button of the web application to change Hub there is a popup window activated by the onclick event. The popup requires me to click on its "yes" button manually in order for the macro to continue to the selected Hub/Centre to get the report. What I want is the Macro to do the clicking to fully automate the process.

    The code that I have written is appended below and the part which clicks the web application's confirm button is in RED

    The HTML source code for the confirm button is as below

    <input type="button" style="WIDTH: 110px; HEIGHT: 24px; Background-Color:#1E90FF; Border-Color:white; Color:white; Font-Weight:bold;Font-family:Verdana; Cursor:hand; " alt="Save" id="btnSave" onclick="javascript:Validation()" value="Confirm">

    The full HTML source code is attached as .txt file HTML source code.txt

    If opened with Notepad++ the code is on line number 477

    Thanks in advance for any help or guidance for the solution of the above problem

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!