“Chromfahrer Selen Python Online Compiler” Code-Antworten

Öffnen Sie eine Webseite mit Selenium Python

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome('./chromedriver')
driver.get("https://www.python.org")
print(driver.title)
search_bar = driver.find_element_by_name("q")
search_bar.clear()
search_bar.send_keys("getting started with python")
search_bar.send_keys(Keys.RETURN)
print(driver.current_url)
driver.close()
Adorable Antelope

Chromfahrer Selen Python Online Compiler

driver = webdriver.Chrome()
driver.get("http://practice.automationtesting.in/")
driver.implicitly_wait(5)
driver.maximize_window()

driver.execute_script("window.scrollBy(0, 600);")
read_more_btn = driver.find_element_by_css_selector(".post-160 > a > h3") # li.post-160 a:nth-child(2)
read_more_btn.click()
reviews_btn = driver.find_element_by_css_selector(".reviews_tab > a")
reviews_btn.click()
five_star_btn = driver.find_element_by_css_selector(".star-5")
five_star_btn.click()
your_review_field = driver.find_element_by_id("comment")
your_review_field.send_keys("Nice book!")
name_field = driver.find_element_by_id("author")
name_field.send_keys("Test_Name")
email_field = driver.find_element_by_id("email")
email_field.send_keys("[email protected]")
submit_btn = driver.find_element_by_id("submit")
submit_btn.click()

driver.quit()
nata Natino

Chromfahrer Selen Python Online Compiler

isdbksd sdjbfbs
Odd Osprey

Chromfahrer Selen Python Online Compiler

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome('./chromedriver')
driver.get("https://www.python.org")
print(driver.title)
K Niharika

Ähnliche Antworten wie “Chromfahrer Selen Python Online Compiler”

Fragen ähnlich wie “Chromfahrer Selen Python Online Compiler”

Weitere verwandte Antworten zu “Chromfahrer Selen Python Online Compiler” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen