• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
九五二七乌托邦
博客园    首页    新随笔    联系   管理    订阅  订阅
2022年3月11日
Selenium 进去frame标签
摘要: 序号 方法 描述 1 switch_to.frame() 切换frame, reference是传入的参数,用来定位frame, 可以传入id、name、index以及 selenium的WebElement对象 2 switch_to.default_content() 返回主文档 3 switc 阅读全文
posted @ 2022-03-11 17:36 九五二七乌托邦 阅读(38) 评论(0) 推荐(0)
Selenium 执行js脚本,截屏
摘要: # -*- coding: utf-8 -*- from selenium import webdriver driver = webdriver.Chrome() driver.get('https://www.baidu.com') driver.find_element_by_id('kw') 阅读全文
posted @ 2022-03-11 17:28 九五二七乌托邦 阅读(64) 评论(0) 推荐(0)
Selenium鼠标键盘事件
摘要: Seleni um中的鼠标和键盘事件被封装在Act ionChains类中,正确的使用方法是:ActionChains (driver). click (btn). perform() 下面列出Acti onChains中常用方法: 序号 方法 描述 1 click(on_element=None) 阅读全文
posted @ 2022-03-11 17:04 九五二七乌托邦 阅读(80) 评论(0) 推荐(0)
selenium 等待
摘要: 执行的时候要等待XX元素出来的时候再执行XX操作 from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_co 阅读全文
posted @ 2022-03-11 16:43 九五二七乌托邦 阅读(26) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3