Posted: 2 Feb 2018 6:55 EST Last activity: 5 Feb 2018 9:07 EST
Automation not working as Expected
Requirement : I am working with a web application wherein the automation has to go to a URL, post which it has to generate a report based on matching a value (report name) from excel with one of the values in a drop-down menu(report name) on the webpage. This report then has to be downloaded. It has to work for all reports defined in the excel sheet.
Issue: For only some executions of the bot, the automation is working fine for all values defined in excel. The flow is: I am starting the web app ,then selecting the report in drop down (after reading from Excel) and then downloading it and closing the web app.
After closing the web app, I am putting a pause of 15 seconds. Also, I am setting the stopmethod property of the web app as Terminate because with default property I get the popup which states "Internet Explorer has stopped working". However,Still I have observed many a times, the autx is not closing the web adapter due to which I am getting the error saying "The process iexplore.exe failed to start within the given timeframe".
Its surprising because for some executions it throws no error and downloads all the reports and closes the runtime.
Could it be because I am executing the bot on an HVD machine ?
You might try using the Process.Kill method before you start your adapter to terminate all iexplore instances. You can do that in a script or within and automation using the static method GetProcessesByName and passing that to ListLoop (extracting a proxy and then calling the Kill method on the proxy object).
I would caution you on stopping the adapter repeatedly. Unless you need to stop it, I would just navigate back to the starting point for the next download. That would not only save time, but would prevent this issue.