Sometimes there could be a dialog that needs to be handled when doing web automation, like file upload dialog, print dialog, or save as dialog. The problem is that the libraries that we use to do web automation normally do not support automating these dialogs.
I will introduce two different ways of handling file upload dialog in web automation here.