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()
相关推荐
_BugMan33 分钟前
【IDEA】干活?一个IDEA即可,集成开发平台打造攻略
java·ide·intellij-idea
明达智控技术10 小时前
MR30分布式I/O模块在化工行业的应用
物联网·自动化
双翌视觉10 小时前
机器视觉的手机柔性屏贴合应用
智能手机·自动化·视觉检测·机器视觉
Blue桃之夭夭12 小时前
Visual Studio Code设置个性化背景教程
ide·vscode·编辑器
Winter_Sun灬13 小时前
Mac开发第一步 - 安装Xcode
ide·macos·xcode
qinyia13 小时前
用 Wisdom SSH 轻松实现服务器自动化任务调度
服务器·自动化·ssh
明达智控技术14 小时前
MR30分布式I/O在面机装备中的应用
分布式·物联网·自动化
demaichuandong15 小时前
详细讲解锥齿轮丝杆升降机的加工制造工艺
人工智能·自动化·制造
疯狂的维修15 小时前
c#中public类比博图
c#·自动化
编程乐学16 小时前
安卓非原创--基于Android Studio 实现的新闻App
android·ide·android studio·移动端开发·安卓大作业·新闻app