📜  Selenium-概述

📅  最后修改于: 2020-12-04 04:49:09             🧑  作者: Mango


介绍

Selenium是用于测试Web应用程序的开源和便携式自动化软件测试工具。它具有跨不同浏览器和操作系统进行操作的功能。 Selenium不仅是一个工具,而且是一组工具,可以帮助测试人员更有效地自动化基于Web的应用程序。

现在让我们了解Selenium套件中可用的每个工具及其用法。

Sr.No. Tool & Description
1

Selenium IDE

Selenium Integrated Development Environment (IDE) is a Firefox plugin that lets testers to record their actions as they follow the workflow that they need to test.

2

Selenium RC

Selenium Remote Control (RC) was the flagship testing framework that allowed more than simple browser actions and linear execution. It makes use of the full power of programming languages such as Java, C#, PHP, Python, Ruby and PERL to create more complex tests.

3

Selenium WebDriver

Selenium WebDriver is the successor to Selenium RC which sends commands directly to the browser and retrieves results.

4

Selenium Grid

Selenium Grid is a tool used to run parallel tests across different machines and different browsers simultaneously which results in minimized execution time.

硒的优点

QTP和Selenium是市场上用于软件自动化测试的最常用工具。因此,比较硒在QTP上的优点是有意义的。

Selenium QTP
Selenium is an open-source tool. QTP is a commercial tool and there is a cost involved in each one of the licenses.
Can be extended for various technologies that expose DOM. Limited add-ons and needs add-ons for each one of the technologies.
Has capabilities to execute scripts across different browsers. Can run tests in specific versions of Firefox , IE, and Chrome.
Can execute scripts on various operating systems. Works only with Windows.
Supports mobile devices. Supports mobile devices with the help of third-party tools.
Executes tests within the browser, so focus is NOT required while script execution is in progress. Needs Focus during script execution, as the tool acts on the browser (mimics user actions).
Can execute tests in parallel with the use of Selenium Grids. QTP cannot execute tests in parallel, however integrating QTP with QC allows testers to execute in parallel. QC is also a commercial tool.

硒的缺点

现在让我们讨论SQ上Selenium的陷阱。

Selenium QTP
Supports only web based applications. Can test both web and desktop applications.
No feature such as Object Repository/Recovery Scenario QTP has built-in object repositories and recovery scenarios.
No IDE, so the script development won’t be as fast as QTP. More intuitive IDE; automation can be achieved faster.
Cannot access controls within the browser. Can access controls within the browser such as favorites bar, backward, and forward buttons.
No default test report generation. Default test result generation within the tool.
For parameterization, users has to rely on the programming language. Parameterization is built-in and easy to implement.