We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
selenium的使用:https://www.cnblogs.com/xiao-xue-di/p/10932504.html selenium常用语法:
2. 基本语法:
from selenium import webdriver browser = webdriver.Chrome() #声明浏览器对象 browser.get('URL') #访问页面
3. 查找元素: find_element(By.ID/CSS_SELETOR/CLASS...., ' ')
find_element(By.ID/CSS_SELETOR/CLASS...., ' ')
4. 常用操作:
- send_keys() #追加式输入,不是替换式输入 - clear() # 无参,清空数据 - click() #无参,点击元素 - select:下拉列表(**需要多研究**) - 导入:from selenium.webdriver.support.select import Select - 封装Select - 模拟键盘操作: - send_keys(Keys.CONTROL, 'a') #Ctrl + a 全选 - send_keys(Keys.CONTROL, ‘c’)#Ctrl+c复制 - send_keys(Keys.CONTROL, ‘v’)#Ctrl+v粘贴 - send_keys(Keys.CONTROL, ‘a’, Keys.DELETE)#删除 - 弹出框操作(需要研究) - 等待操作: - time.sleep() #强制等待 - driver.impolicitly_wait() #隐式等待 - 切换frame (需要研究)
Sorry, something went wrong.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: