当前位置:网站首页>The Selenium IDE of the Selenium test automation
The Selenium IDE of the Selenium test automation
2022-07-31 13:47:00 【Illusory private school】
Quality resource sharing
| Learn route directions (click to unlock) | Knowledge Positioning | Crowd targeting |
|---|---|---|
| 🧡 Python actual WeChat ordering applet 🧡 | Advanced | This course is a perfect combination of python flask+WeChat applet, from project construction to Tencent Cloud deployment, to create a full-stack meal ordering system. |
| Python quantitative trading practice | Entry Level | Take you hand in hand to build a quantitative trading system that is easy to expand, safer and more efficient |
Introduction
Selenium IDE is a handy tool for web automation, essentially a browser plugin.The plug-in supports Chrome and Firefox browsers, and has functions such as recording, writing and playback operations, and can quickly implement automated Web testing
Scenarios
- The positioning of Selenium IDE itself is not for complex automation scenarios, but for some simple scenarios with extremely high requirements for efficiency
- Used to find bugs, reproduce bugs, and improve communication efficiency
- Improve use case execution efficiency and improve regression efficiency
- The recording function can export the code and save the time of automatic code writing
Install:
- Open Firefox browser and search for Firefox plugins

- Click to select and enter to install
Basic Operations
Click the icon to enter 
Record and Playback

- Click the first option and we record a new project
- Enter a project name
- Enter the URL to record

- Operate the page in the recording state after jumping to the page
- Pause the recording after the operation, the status is shown as below

- Click the button for playback

Note: The save button in the upper right corner of the above picture can be used to save the recording script
7. 
8. Scripts can be exported to save time writing use cases 
| 123456789101112131415161718192021222324252627 | # GeneratedbySelenium IDE``import pytest``importtime``import json``fromselenium import webdriver``fromselenium.webdriver.common.``byimportBy``fromcode>selenium.webdriver.common.action_chains import ActionChains``fromselenium.webdriver.support import expected_conditions``fromselenium.webdriver.support.wait import WebDriverWait``fromselenium.webdriver.common.keys import Keys``fromselenium.webdriver.common.desired_capabilities import DesiredCapabilitiesclass TestFirsttest():``def setup_method(self, method):``self.driver = webdriver.Firefox()``self.vars = {}def teardown_method(self, method):``self.driver.quit()def test_firsttest(self):``self.driver.get(``"https://www.baidu.com/"``)``self.driver.set_window_size(1146, 693)``self.driver.find_element(``By``.ID,"kw"``).click()``self.driver.find_element(``By``.ID,"kw"``).send_keys(``"helloworld"``)``self.driver.find_element(``By``.ID,"su"``).click() |
Test Suite
- In the same project, you can manage multiple test cases at the same time.Click the "+" button in the test view of Selenium IDE to add a new test case, or right-click a test case and select the Duplicate option in the context menu to copy
- If each module has dozens of test cases, then these use cases will be very difficult to maintain under the corresponding panel, so that it is impossible to tell which module each use case belongs to.Selenium IDE provides a feature called "Test Suite" to manage test cases

边栏推荐
猜你喜欢

C# control StatusStrip use

Grab the tail of gold, silver and silver, unlock the programmer interview "Artifact of Brushing Questions"

新款现代帕里斯帝预售开启,安全、舒适一个不落

SetoolKit使用指南

An article makes it clear!What is the difference and connection between database and data warehouse?

多智能体协同控制研究中光学动作捕捉与UWB定位技术比较

Spark学习:为Spark Sql添加自定义优化规则

代码随想录笔记_哈希_454四数相加II

C# control ToolStripProgressBar usage

八大排序汇总及其稳定性
随机推荐
selenium被反爬了怎么办?
【牛客刷题-SQL大厂面试真题】NO3.电商场景(某东商城)
Selenium自动化测试之Selenium IDE
C# List Usage List Introduction
Sliding window method to segment data
csdn发文助手问题
C#控件StatusStrip使用
ADS communicate with c #
深度剖析 Apache EventMesh 云原生分布式事件驱动架构
Samba 远程命令执行漏洞(CVE-2017-7494)
Error IDEA Terminated with exit code 1
20.nn.Module
VU 非父子组件通信
pytorch gpu版本安装最新
ICML2022 | Fully Granular Self-Semantic Propagation for Self-Supervised Graph Representation Learning
Install the latest pytorch gpu version
TensorRT安装及使用教程「建议收藏」
golang-gin-优雅重启
技能大赛训练题:ftp 服务攻防与加固
爱可可AI前沿推介(7.31)