当前位置:网站首页>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 | # Generated
by
Selenium IDE``import pytest``import
time``import json``from
selenium import webdriver``from
selenium.webdriver.common.``by
import
By``from
code>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 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
边栏推荐
- 使用NVM进行node版本切换管理
- 网络协议及相关技术详解
- 3.爬虫之Scrapy框架1安装与使用
- The latest complete code: Incremental training using the word2vec pre-training model (two loading methods corresponding to two saving methods) applicable to various versions of gensim
- matlab as(assert dominance)
- 报错IDEA Terminated with exit code 1
- STM32——软件SPI控制AD7705[通俗易懂]
- C#使用ComboBox控件
- [Niu Ke brush questions - SQL big factory interview questions] NO3. E-commerce scene (some east mall)
- 自制的数据库安全攻防题,相关靶机自己制作
猜你喜欢
随机推荐
ECCV 2022 | 机器人的交互感知与物体操作
动作捕捉系统用于柔性机械臂的末端定位控制
JSP response对象简介说明
The latest complete code: Incremental training using the word2vec pre-training model (two loading methods corresponding to two saving methods) applicable to various versions of gensim
matlab as(assert dominance)
技能大赛训练题:ftp 服务攻防与加固
Buffer 与 拥塞控制
PHP Serialization: eval
一篇文章讲清楚!数据库和数据仓库到底有什么区别和联系?
3.爬虫之Scrapy框架1安装与使用
Error IDEA Terminated with exit code 1
C# control ListView usage
Network layer key protocol - IP protocol
hyperf的启动源码分析(二)——请求如何到达控制器
How to quickly split and merge cell data in Excel
Grab the tail of gold, silver and silver, unlock the programmer interview "Artifact of Brushing Questions"
A detailed explanation of the usage of Async and Await in C#
AWS implements scheduled tasks - Lambda+EventBridge
Selenium IDE for Selenium Automation Testing
IDEA如何运行web程序