Selenium conclusion,

Source: Internet
Author: User

Selenium conclusion,
Personal Understanding of selenium:

1. Using selenium to operate the browser is actually using the webdriver In the selenium framework to start the drivers of various browsers to perform operations on the browser. Run the following code to start the firefox browser DRIVER:

From selenium import webdriver

Brower = webdriver. Firefox ()

Therefore, the role of selenium is equivalent to simulating user operations on the browser (Click links, buttons, fill in forms, screenshots, control window size, install plug-ins, configure certificates, and so on ).
The reason why webdriver can manipulate the browser is that webdriver encapsulates the browser API. Because the browser API implementation methods produced by different manufacturers are not the same, webdriver is also divided into FirefoxDriver, ChromeDriver, iOSDriver and other drivers.
To call different browsers, in addition to installing and importing the webdriver module, we also need to download the driver corresponding to the browser.

2. webdriver can locate nodes,

Selenium Tutorial:

1. Mr. Nanke

I. Positioning related content:

1. Unable to locate the five situations and Solutions

2. iframe affects switchover and handling after Positioning

There are three main functions:

Brower. switch_to.frame (reference) is included in the referrence frame.

Brower. switch_to.parent_frame () is switched back to the parent frame.

Brower. swith_to.default_content () is switched back to the home page. If you want to switch between several parallel frames, you must add this sentence to the home page and switch to another iframe.

Ii. selenium related methods

1. Summary of common Python Selenium Methods

Iii. selenium packages

from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.