I. Introduction
selenium is a UI test automation framework based on web pages.
1. Support multi-browser operation, IE, firefox, chrome, edge, Safari, etc.
2. Cross-platform, windows, linux, Mac can
3, support for multiple languages, python, java, ruby, c #, etc.
Two, selenium webdriver principle
webdriver accordance c / s mode design.
client: The client programming language, such as python selenium client
server: browser driver, you go to receive their drive and browser client to perform an operation and returns the result.
selenium and code browser is driven data exchange between programs through the http protocol, in this way do not care what form the client, as long as the data formats and protocols are able to resolve the server on it.
A communication step of:
1.webdriver start the browser driver and set the listening port number
2.webdriver client establishes a connection with the server browser
3. After a successful connection, all operations (for example, to find elements, clicks, etc.) are the client command by command executor executer sends http request to the server: the server to do the appropriate action upon request, and returns the result
DETAILED interact as shown below: