Code
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import pandas as pd
January 19, 2023
I relied heavily on the Quarto documentation for this tutorial.
The basic things I learned were:
py -m pip install jupyter
python3 -m pip install jupyter
python3 -m pip install numpy
python3 -m pip install matplotlib
After I did this, the code from the Quarto website example (below) seemed to work!
For a demonstration of a line plot on a polar axis, see ?@fig-polar.
options = webdriver.SafariOptions()
driver = webdriver.Safari(options=options)
def test_eight_components():
driver = webdriver.Chrome()
driver.get("https://www.selenium.dev/selenium/web/web-form.html")
title = driver.title
assert title == "Web form"
driver.implicitly_wait(0.5)
text_box = driver.find_element(by=By.NAME, value="my-text")
submit_button = driver.find_element(by=By.CSS_SELECTOR, value="button")
text_box.send_keys("Selenium")
submit_button.click()
message = driver.find_element(by=By.ID, value="message")
value = message.text
assert value == "Received!"
driver.quit()