Skip to content

I'm fed up with always having to struggle unnecessarily when I have to use Selenium on a new machine, so I made this little python module for personal use to simplify using Selenium

SomebodyLikeEveryBody/SeleniumManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

SeleniumManager

I'm fed up with always having to struggle unnecessarily when I have to use Selenium on a new machine, so I made this little python module for my personal use to simplify Selenium's utilisation in a new environment

usage

  1. Download SeleniumManager.py

  2. Download and put with SeleniumManager.py the correct firefox geckodriver here: https://github.com/mozilla/geckodriver/releases

  3. Install Selenium using, for example:

python -m pip install selenium
  1. Launch Python in the repertory containing SeleniumManager.py and the geckodriver

  2. Import Selenium Manager by doing in the python console

import SeleniumManager

It will open the Firefox browser

. So you can:

  • go to an url by typing directly in the opened browser or by typing in the python console
SeleniumManager.get(string: url)
  • get elements using css-selectors by doing
SeleniumManager.find_elements(string: css-selector): SeleniumWebElement[]
  • manipulate the obtained array as you want
l = SeleniumManager.find_elements("ul#list li a")
result = map(lambda el: el.text, l)
print(l)

About

I'm fed up with always having to struggle unnecessarily when I have to use Selenium on a new machine, so I made this little python module for personal use to simplify using Selenium

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages