A few posts ago, I mentioned that I had been tasked with a script that would automate web browsing to a website. I felt, after doing a little bit of research, that the SendKeys module was best suited for the job. The only problem I encountered was when entering the same key command over and over again became extremely tedious as you can see on the right.
The script would load up a webpage, unfortunately using Internet Explorer, accept a security certificate, type in log in details, open a certain page and then activate an online platform that is used by the company I work for. With this script running on another PC to the one it was developed on, I needed to use another module, Py2Exe, to convert the .py file into an executable file.
Despite the length of the script and the repetitive nature of the commands, the script works absolutely perfectly. The pauses need to be planned in advance – especially when loading an application such as Internet Explorer. I obviously will not be posting the script I built due to the fact it does include an internal IP address of a company’s SNMP probe and log in details but I thoroughly recommend the SendKeys module for any automated tasks you encounter.
If you know of a better way in which automated web browsing can be achieved, I am extremely happy to hear any ideas you may have =)