devops:selenium
This is an old revision of the document!
Table of Contents
Selenium
Prerequirements
- Python - Python selenium plugin, installed via
pip install selenium
Recording
To record the cases use chrome plugin: “Katalon Recorder (Selenium IDE for Chrome)”
Download the chromedriver: http://chromedriver.storage.googleapis.com/index.html And use it within the script
Here is a demo script:
from selenium import webdriver chromedriver = "..//ChromeWebDriver//chromedriver.exe" driver = webdriver.Chrome(chromedriver) driver.get("http://localhost:8080") assert "Frontend" in driver.title elem = driver.set_window_size(1800,800) driver.find_element_by_id("menu-about").click(); elem = driver.save_screenshot('screen1.png') driver.quit()
devops/selenium.1525699307.txt.gz · Last modified: (external edit)