technique:python:selenium

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
technique:python:selenium [2021/07/15 18:19] – créée francoisatechnique:python:selenium [2024/04/02 15:08] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
-====== Selenium ====== +**Cette page est obsolèteVeuillez accéder au contenu à son nouvel emplacement [[https://bibliotech.cemea.org/books/outils-technique/page/selenium|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/ +
-  - Un script (python) qui appelle le binaire +
- +
-Placer le binaire dans le path ou spécifier le chemin dans le script +
- +
-Exemple : +
- +
-<code python> +
-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() +
- +
-</code> +
- +
  • technique/python/selenium.1626365991.txt.gz
  • Dernière modification : 2021/07/15 18:19
  • de francoisa