Code from this video:
https://github.com/wayscript/wsx_tool...
lair from tutorial:
https://app.wayscript.com/lairs/e6c2e...
code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0')
driver = webdriver.Chrome(options = options)
driver.set_page_load_timeout(30)
Take action on browser
driver.get("http://www.python.org")
Request browser information
title = driver.title
#Establish Waiting Strategy
driver.implicitly_wait(0.5)
#Find an element
elem = driver.find_element(By.XPATH, '//*[@id="content"]/div/section/div[2]/div[1]/div/ul/li[1]/a')
print(elem.text)
#end driver session
driver.quit()
Using WayScript, devs rapidly build production-grade microservices and tools with unprecedented speed and security. Get started for free today: http://wayscript.com
---------------------------
➤ TIMESTAMPS
➤ Questions, comments, or anything else? Join our Discord or drop us a line directly at [email protected]. We’re always around to help: / discord
➤ Follow WayScript on Social Media:
GitHub - https://github.com/wayscript
Twitter - / wayscripthq
LinkedIn - / ways. .
Instagram - / wayscript
Facebook - / wayscript
Start shipping internal tools that make a difference today. Visit us at wayscript.com.
Смотрите видео Execute and Automate Selenium Powered Applications онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь WayScript 09 Сентябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 42 раз и оно понравилось людям.