Selenium is the most widely used Web UI automation testing framework. This series of articles will explain in depth the usage of selenium
Reading Contents
Naming selenium
selenium means selenium (a bit like a QTP killer)
QTP mercury is mercury selenium can fight mercury
The current price of QTP is about 100,000 RMB for three stand-alone versions, and fewer and fewer people are using QTP.
What is selenium
A set of software tools to support different automated testing methods
Open source software: Some functions of the refactoring tool can be added as needed
Cross-platform: linux, windows mac
The core function is to perform automated testing on multiple browsers
Supports multiple programming languages
It has been widely used by companies such as Google, Baidu, and Tencent.
It can realize most of the functions similar to commercial tools, and also implement functions that commercial tools cannot support
It is recommended that you learn the entire set of tools as a whole and choose a test tool that suits your testing purposes in the future.
Selenium's development history
In 2004, in ThoughtWorks, a company called Jason Huggins, in order to reduce manual testing, wrote a Javascript library himself. This library can interact with pages and perform repeated test operations on different browsers.
This library was later transformed into Selenium Core. It provides solid core basic capabilities for Selenium Remote Control (RC) and Selenium IDE
Selenium's role is epoch-making because it allows you to control your browser in multiple languages.
The security restrictions on JS of browsers have also brought trouble to the development of Selenium, and web programs are getting bigger and bigger, and there are more and more features, which have brought a lot of difficulties to the development of selenium.
In 2006, Google engineer Simon Stewart started a project called WebDriver. This project can directly allow the test tools to use methods provided by the browser and operating system itself to bypass the sandboxing effect of the JS environment. The goal of the WebDriver project is to solve the pain points of Selenium.
In the 2008 Beijing Olympic Annual Conference, Selenium and WebDriver were merged, and Selenium 2.0 appeared, which is what everyone calls WebDriver.
Selenium's Tools Kit
selenium 2 (aka. Selenium Webdriver) provides excellent testing tool features, such as the associated object-oriented API
Selenium 1 (aka. Selenium RC or Remote Control) supports more browsers and supports more programming languages (Java, JavaScript, Ruby PHP)
Selenium IDE (Integrated Development Environment) is a plug-in for Firefox that has a graphical interface to record and playback scripts. This plugin is just used as a prototype tool, and you don't want to use this tool to run all the test scripts
Selenium-grid can test scripts in parallel under multiple test environments to implement concurrent test execution of scripts. Shorten the execution time of a large collection of test scripts
Select your Selenium tool
If you have no programming experience, it is recommended to choose Selenium IDE to familiarize with Selenium commands. Use the IDE to quickly create simple test scripts
We do not recommend that you choose Selenium IDE to perform automated tests.
It is recommended to be familiar with: Selenium IDE
Further proficiency in using Selenium-WebDriver API
WebDriver supported browsers
IE6-10
Most versions of FireFox
Chrome
Safari
Opera
The built-in browser on Android system
Browser on IOS system
Interfaceless implementation of HtmlUnit
The difference between Selenium 1 and WebDriver
WebDriver is an upgraded version of Selenium 1, which can also be understood as two different products.
WebDriver can better bypass JS restrictions than Selenium 1, and the API is easier to use.
Selenium 1 supports more browsers than WebDriver
WebDriver can implement backward compatible scripts for Selenium 1