The WebUI.uploadFile function don’t seem to work on site I am testing on. Currently I am just sending keystrokes (Ctrl-V then Enter) to handle the open file dialog box. However I am facing 2 problems with it.
1. How to I check if the open dialog box is opened? My computer is pretty slow. It can take up to like 10 seconds to load the dialog box. For now I just used the delay function to wait for 10 seconds before continuing but is there a way to check if the open dialog box has displayed?
2. How do I force the focus to be on the Open window? If anything happens and takes away the focus of the window from the Chrome browser, it will not work.