Using Selenium for Browser Automation
pip install undetected_chromedriver webdriver_manager
# from selenium.webdriver.chrome.service import Service
# from webdriver_manager.chrome import ChromeDriverManager
# def init(*arguments):
# chrome_options = webdriver.ChromeOptions()
# for argument in arguments:
# if isinstance(argument, str):
# chrome_options.add_argument(argument)
# global driver
# driver = webdriver.Chrome(
# options = chrome_options,
# service = Service(ChromeDriverManager().install())
# )
# global device_pixel_ratio
# device_pixel_ratio = driver.execute_script('return window.devicePixelRatio;')
init('--user-data-dir=C:\\Users\\seii-saintway\\Downloads\\chrome-profile')
Logging
Using Text-based Search for Browser Automation
Using Selenium for Static Inspection of Page Appearance
Using Airtest for Browser Automation
pip install airtest
Using Selenium for Printing to PNG and PDF
pip install markdown
init('--lang=en')
convert_md_with_ruby_to_png('2024-11-21.md')
convert_md_with_ruby_to_pdf('2024-11-21.md')