selenium-ide web 自动化录制工具

https://www.selenium.dev/selenium-ide/ 官方下载插件安装

http://www.winwin7.com/soft/12693.html 官方下载不下来用这个安装的,拖过去安装

selenium的IDE插件进行录制和回放并导出为python/java脚本(10)_selenium ide脚本导出-CSDN博客

复制代码
# Generated by Selenium IDE
import pytest
import time
import json
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

class TestTest1():
  def setup_method(self):
    self.driver = webdriver.Chrome()
    self.vars = {}
  
  def teardown_method(self):
    self.driver.quit()
  
  def test_test1(self):
    self.driver.get("https://www.baidu.com/")
    time.sleep(5)
    self.driver.maximize_window()
    time.sleep(5)
    self.driver.find_element(By.ID, "kw").click()
    time.sleep(5)
    self.driver.find_element(By.ID, "kw").send_keys("ubuntu使用")
    time.sleep(5)
    self.driver.find_element(By.ID, "su").click()
    time.sleep(5)
  
if __name__ == '__main__':
  test = TestTest1()
  test.setup_method()
  test.test_test1()
  test.teardown_method()
相关推荐
taxunjishu1 小时前
DeviceNet 转 Modbus TCP 协议转换在 S7-1200 PLC化工反应釜中的应用
运维·人工智能·物联网·自动化·区块链
小蕾Java6 小时前
PyCharm 软件使用各种问题 ,解决教程
ide·python·pycharm
萧鼎7 小时前
Python schedule 库全解析:从任务调度到自动化执行的完整指南
网络·python·自动化
ManageEngineITSM9 小时前
IT 服务自动化的时代:让效率与体验共进
运维·数据库·人工智能·自动化·itsm·工单系统
周杰伦_Jay12 小时前
【Git操作详解】Git进行版本控制与管理,包括分支,提交,合并,标签、远程仓库查看
大数据·ide·git·科技·分类·github
小二·13 小时前
mac下解压jar包
ide·python·pycharm
weixin_3077791315 小时前
AWS云上ClickHouse数据仓库部署方案详解
开发语言·clickhouse·自动化·云计算·aws
weixin_3077791315 小时前
使用AWS IAM和Python自动化权限策略分析与导出
开发语言·python·自动化·云计算·aws
要站在顶端15 小时前
Jenkins 使用容器运行自动化任务详细文档
docker·自动化·jenkins
YoungHong199219 小时前
一行配置解决claude code 2.0版本更新后 vscode 插件需要登录的问题
ide·vscode·编辑器