标签:rom implicit element expec 元素 from 回车 mon key
# 组合键 - send_keys
from selenium.webdriver.common.by import By
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as ES
import time
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.implicitly_wait(30) # 等待元素存在,命令执行完成
# 访问并搜索
driver.get("http://www.baidu.com")
# 回车按键 Keys.ENTER key 模块
driver.find_element_by_id("kw").send_keys("柠檬班",Keys.ENTER)
标签:rom implicit element expec 元素 from 回车 mon key
原文地址:https://www.cnblogs.com/yago/p/11443701.html