当前位置:网站首页>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

边栏推荐
猜你喜欢
随机推荐
【牛客刷题-SQL大厂面试真题】NO3.电商场景(某东商城)
Istio微服务治理网格的全方面可视化监控(微服务架构展示、资源监控、流量监控、链路监控)
Even if the image is missing in a large area, it can also be repaired realistically. The new model CM-GAN takes into account the global structure and texture details
网络协议及相关技术详解
模拟量差分和单端(iou计算方法)
尚硅谷-JVM-内存和垃圾回收篇(P1~P203)
页面整屏滚动效果
IDEA can't find the Database solution
八大排序汇总及其稳定性
网络层重点协议——IP协议
LeetCode旋转数组
hyperf的启动源码分析(二)——请求如何到达控制器
EXCEL如何快速拆分合并单元格数据
C# 中的Async 和 Await 的用法详解
「面经分享」西北大学 | 字节 生活服务 | 一面二面三面 HR 面
All-round visual monitoring of the Istio microservice governance grid (microservice architecture display, resource monitoring, traffic monitoring, link monitoring)
计算机复试面试问题(计算机面试常见问题)
P5019 [NOIP2018 提高组] 铺设道路
C#使用ComboBox控件
C# using ComboBox control









