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()
相关推荐
2601_960567962 分钟前
电商套图自动化效率的工程量化分析——从逐张生成到批量套图的架构演进
运维·架构·自动化
HiDev_1 小时前
【非标自动化】2、认识元器件(确定目标)
运维·自动化
一次旅行2 小时前
Python+大模型端到端自动化日报系统
开发语言·python·自动化
我送炭你添花3 小时前
工业现场疑难软故障实录:09 老旧产线,稳定裕量已经被吃光了
机器人·自动化·智能工厂
AOwhisky4 小时前
Python 学习笔记(第十五期)——运维自动化(下·后篇):堡垒机实战——paramiko高阶篇
运维·python·学习·云原生·自动化·运维开发
Urbano4 小时前
夹克与商务单西口袋工序自动化技改研究报告
运维·自动化
ClouGence8 小时前
哪些场景适合做自动化测试?这 4 类最值得优先投入
selenium·测试
MXsoft61810 小时前
成熟的自动化运维平台是什么样的?
运维·数据库·自动化
江边风声11 小时前
PCB自动化收放板机 在薄板制程中的特殊取放策略——0.05mm芯板怎么稳抓不掉
人工智能·科技·自动化·制造·pcb工艺
ClouGence11 小时前
Selenium vs CueCast:自动化测试一定要写代码吗?
selenium·测试