Using Selenium with AutoHotkey- Cross browser automation!
Posted: 26 May 2017, 15:38
I finally got around to documenting some of the work I've done using AutoHotkey and Selenium.
On this page I have several videos & example code showing what you need to install, and now to use the code. I hope y'all find this helpful! It was incredibly confusing!
While all the example code is on the above links, you can see the videos below:
What is Selenium (and why does it matter for AutoHotkey users)- No longer be tied to just automating IE!!!
Installing SeleniumBasic for use with AutoHotkey (When you try and install Selenium on your own you'll understand how confusing it is!)
Starting up the WebDrivers & navigating to a page (BTW- you don't have to "wait" for the page to load!)
Getting information from the page (somewhat similar to AutoHotkey & COM but there are significant differences)
Setting text and clicking links (This is very different than AutoHotkey & IE. Hopefully this can be improved upon!)
Please note: be very careful you watch your case as the code is case sensitive!
Here I demonstrate how you can leverage your Chrome profile to avoid logging in each time!
When iterating over Objects in Selenium, please remember that the objects are in the Keys, not the values.
Two other important notes are: use .Count instead of .Length and you don't need to use .item[A_index] inside a for loop.
Here I review quite a few methods available in Selenium for getting/setting text on a page. CSS & XPath take some getting used to but can be invaluable when you are trying to grab very specific things.
In this video I demonstrate some addtional cool Selenium Methods as well as some equivalents by injecting JavaScript.
Be sure to check out my site posting for the actual AutoHotkey code.
Frames are always such a pain I figured I should at least touch on how to navigate them with Selenium & AutoHotkey.
Downloading files (PDF, Excel, etc) with Selenium & AutoHotkey is pretty easy.
On this page I have several videos & example code showing what you need to install, and now to use the code. I hope y'all find this helpful! It was incredibly confusing!
While all the example code is on the above links, you can see the videos below:
What is Selenium (and why does it matter for AutoHotkey users)- No longer be tied to just automating IE!!!
Installing SeleniumBasic for use with AutoHotkey (When you try and install Selenium on your own you'll understand how confusing it is!)
Starting up the WebDrivers & navigating to a page (BTW- you don't have to "wait" for the page to load!)
Getting information from the page (somewhat similar to AutoHotkey & COM but there are significant differences)
Setting text and clicking links (This is very different than AutoHotkey & IE. Hopefully this can be improved upon!)
Please note: be very careful you watch your case as the code is case sensitive!
Here I demonstrate how you can leverage your Chrome profile to avoid logging in each time!
When iterating over Objects in Selenium, please remember that the objects are in the Keys, not the values.
Two other important notes are: use .Count instead of .Length and you don't need to use .item[A_index] inside a for loop.
Here I review quite a few methods available in Selenium for getting/setting text on a page. CSS & XPath take some getting used to but can be invaluable when you are trying to grab very specific things.
In this video I demonstrate some addtional cool Selenium Methods as well as some equivalents by injecting JavaScript.
Be sure to check out my site posting for the actual AutoHotkey code.
Frames are always such a pain I figured I should at least touch on how to navigate them with Selenium & AutoHotkey.
Downloading files (PDF, Excel, etc) with Selenium & AutoHotkey is pretty easy.