Ceci est une ancienne révision du document !
Selenium
pour tests d'interface web : https://www.selenium.dev/downloads/
Pré-recquis
- un navigateur compatible : Firefox, Chrome, Chromium, IE
- un binaire pour le nvigateur :
- Chromium : https://chromedriver.chromium.org/
- Firefox : https://github.com/mozilla/geckodriver/
- installer la lib pyhon selenium (via pip ou virtualenv)
- Un script (python) qui appelle le binaire
Placer le binaire dans le path ou spécifier le chemin dans le script
Exemple :
import time from selenium import webdriver from selenium.webdriver.chrome.service import Service service = Service('/path/to/chromedriver') service.start() driver = webdriver.Remote(service.service_url) driver.get('http://www.google.com/'); time.sleep(5) # Let the user actually see something! driver.quit()