Joke Collection Website - Mood Talk - Selenium tests why the Selenium server should be started.

Selenium tests why the Selenium server should be started.

Selenium? The server mainly controls the browser behavior. Generally speaking, selenium? The server consists of three parts: Launcher and Http? Agent, selenium? Core, in which selenium? The core is in selenium? The embedded in the browser when the server starts the browser. Selenium? Core is a collection of Javascript functions. When is selenium? RC and? Selenium? Server communication (through simple Http? Get or Post request), Selenium? The server parses the client request as selenium? Command, and then the corresponding JS function will be called to control the operation of the browser.

(1). Test cases are passed through the client? Selenium's Lib interface? The server sends an Http request, asking Selenium? The server establishes a connection.

Why do you want to control Selenium by sending Http requests? Server instead of using other methods? As can be seen from the above, selenium? Server is an independent intermediate server (specifically a proxy server), which can be set on other machines! So the test case controls Selenium by sending HTTP requests? The server is normal.

(2). Selenium? The server's launcher starts the browser and puts Selenium? Load the kernel into the browser page and set the proxy of the browser to Selenium? Http of the server? Agent.

(3). The test case passes through the client? Selenium's Lib interface? The server sends an Http request, Selenium? The server parses the request and then sends it through Http? Agent sends JS command to notify Selenium? The kernel performs the action of operating the browser.

(4). Selenium? After receiving the instruction, the kernel executes the operation.

(5). The browser receives the new page request information (because in (4), Selenium? The operation of the kernel may trigger a new page request), so it sends an Http request to request a new web page.

Because of selenium? The server tampered with the browser, so selenium? The server will receive all requests sent by the browser it started.

(6). Selenium? After the server receives the Http request from the browser, it reorganizes the Http request and obtains the corresponding webpage.

(7). Selenium? Http of the server? The proxy returns the received web page to the browser.

Because of the browser root policy, selenium? Selenium in RC? The server needs to run in this proxy mode.