Best way to code closing a browser(app) triggered after a complete windows copy event
I'm trying to figure out what is the best way to code this set of events: ( windows environment, running FireFox )
-after executing a web application (report), wait for report to finish, then:
Perform a File > Save Page As > newfilename > Save > close Firefox
So far I have it working with this code starting at the waiting of the report:
wait(50) --high to give me time if needed for a slow report
click(File.png)
click(SavePageA
exists(
paste("MyNewFile")
type(Key.ENTER)
wait(5.0)
exists(
click(getLastMa
wait(30.)
closeApp("Firefox")
closeApp("cmd")
Intermittent issues so far:
-Sometimes when it saves the file, it takes sometime to finish the copy of the file to a remote folder. Firefox pops up a window and shows copy progress of my "MyNewFile" to its target folder.
-So if it takes long or passes my wait(30) threshold, it will then close the app before I need it too
I would like to make it more robust where I am waiting for the copy to finish. Should I be capturing that window?
What is a good way to handle this event? Once I know the copy is done using Firefox, then I want to close the app.
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Mel Adajar for more information if necessary.