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()
相关推荐
你说我胖?3 小时前
Visual Studio编辑生成exe
ide·visual studio
收放扳机8 小时前
PCB收放板设备机械手架构选型参考——三轴/四轴/六轴/蜘蛛手对比
人工智能·科技·架构·自动化·制造·pcb工艺
代码不停9 小时前
自动化测试(java)
java·开发语言·selenium·自动化
西柚不烦恼11 小时前
PyCharm 虚拟环境与 Jenkins 自动化部署实践
pycharm·自动化·jenkins
2302_8057710711 小时前
Day24:DDT+EXCEL数据驱动
功能测试·单元测试·自动化·测试用例·需求分析·web自动化
Dovis(誓平步青云)12 小时前
常用命令藏得太深?怎么做一个快捷命令坞
运维·前端·自动化·音视频·prometheus
看着博客敲代码12 小时前
WorkBuddy 接上 Kali MCP 做自动化渗透:信息收集到初步验证的落地记录
linux·人工智能·安全·网络安全·自动化
志栋智能12 小时前
运维超自动化的知识管理与传承
运维·自动化
jack1868913 小时前
OpenClaw 数据采集与自动化应用场景指南
运维·自动化
奈落2413 小时前
规则引擎还是大模型?AI 工作流与传统自动化的分工边界:确定性流程照旧,‘每次都不太一样‘的知识型工作才交给 AI
运维·人工智能·自动化·大模型·工作流·ai 办公