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()
相关推荐
Earth explosion6 小时前
ide使用技巧与插件推荐
ide
dringlestry6 小时前
pycharm将当前项目上传到github
ide·pycharm·github
明月清风徐徐14 小时前
Miniconda + VSCode 的Python环境搭建
ide·vscode·python
朱剑君17 小时前
第十五天:Selenium与PhantomJS
爬虫·python·selenium
成都纵横智控科技官方账号18 小时前
工业路由器和工业交换机,打造高效稳定的工业网络?
网络·物联网·自动化
郑祎亦18 小时前
IDE(集成开发环境)
ide
三掌柜66618 小时前
使用Trae AI IDE,轻松实现交友聊天功能
ide·人工智能
fruge18 小时前
007 HBuilderX提示IDE service port disabled. To use CLI Call, open IDE
ide·notepad++
九思x19 小时前
Android Studio安装配置及运行
android·ide·android studio