Selenium Basics

My blog post URL: https://www.peretang.com/basic-knowledge-of-selenium/


What is Selenium

  Selenium is an automated testing tool

  is a set of different tools

  It supports executing tests on multiple browser platforms

  

Why you need Selenium

  1. Automate manual testing

  2. Easier to complete frequent regression tests

  3. Faster feedback to developers and testers

  4. Test execution for almost infinite iterations

  5. More disciplined test cases

  6. Automatically generate defect reports

  7. Complement manual testing omissions

 

Introduction to Selenium Components

Selenium RC

  The most important project in the past, is now deprecated and no longer updated

  The principle is to use a RemoteControlServer as a proxy to control the real browser

Selenium WebDriver

  The combination of Selenium Rc and WebDriver includes an object-oriented API, supports the WebDriver API, and can use its API to directly call the API on the browser to obtain results and perform underlying operations on the browser. Selenium RC Compatible

  WebDriver is a web automated testing tool for complex and repetitive testing. It is a competitor of Selenium, and it is intended to provide an API that is easier to use and maintain.

Selenium IDE

  A design tool for building test scripts, which is a plug-in for FireFox browser, provides an easy-to-use interface to develop automated test cases, and has the function of recording, which can record the user's operation steps and convert them to export Test scripts for different programming languages

Selenium Grid

  Allows tests to be run in parallel, i.e. different tests can be executed simultaneously on different remote machines, greatly improving the time required to execute tests due to the use of parallelism

 

SeleniumRC given SeleniumWebDriver

Disadvantages of Selenium RC

  Cannot handle keyboard and mouse events

  Cannot handle Same Origin Policy XSS/HTTP(S)

  Can't handle popups, dialogs, basic authentication, self-signed certificates, file upload/download

Disadvantages of Selenium WebDriver

  Parallelism is not supported, but this can be solved using Selenium Grid

  Incomplete browser support

  Inconsistent operation API for different browsers

The difference between the two

  SeleniumWebDriver needs API and browser support, SeleniumRC has a unified API, but requires an additional proxy operation server

  SeleniumWebDriver can simulate browsers through HTMLunitDriver for quick testing, SeleniumRC needs a real browser to exist

 

refer to

  SeleniumHQ

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326190901&siteId=291194637