These are some impressions and lessons that I learned from writing a few scripts that access web-interfaces over the last few weeks.
path = "C:\\Users\\[username]\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\[profile]"
fox_profile = webdriver.FirefoxProfile(path)
driver = webdriver.Firefox(fox_profile)
This will load the profile that you would normally use with Firefox.
- Learn your CSS selectors. This is extremely helpful if you are trying to pick out an element for testing. Some elements are buried under a whole mess of
<divs>that make selection via the absolute path really tedious. The best method is to look out for classes and use CSS selectors to pick out the precise tag that you wanted.
- Installing geckodriver is annoying.
tar -xvzf geckodriver*
chmod +x geckodriver
In the .bashrc file: