selenium + python learning --webdriver summary

1, before learning automation, you must first understand the basic grammar of python and html

2, the installation environment

1) installation method to install python + pycharm

May refer to: micro-channel public number: Butler software installation (containing the installation package and mounting method)

2) install selenium

Bowen may refer to: https://www.cnblogs.com/yuer02/p/11905605.html

3 based learning

1) need to master element positioning method

a, targeting eight single element

b, xpath binding properties Location

c, css targeting binding properties

 

Xpath difference css positioning method and positioning method: two substantially all the elements can be positioned. xpath slow positioned elements, the syntax is very long, is not stable, and css positioning faster and more concise. But I am quite accustomed to using xpath

d, targeting down frame

Reference Links: https://www.cnblogs.com/yoyoketang/p/6128636.html

Actually, there are elements of targeting find_elements_by_xxx, and 8 elements in the same manner as the positioning, simply by adding the index; also may be positioned by using By (subsequent re-study)

2) Operation page

 There are other, subsequent supplements

3) operating element

 4) frameset

 5) determine whether the element in line with expectations

Refer to the link: http://www.mamicode.com/info-detail-1720150.html

 6) multi-window, handle

 7) Load chrome Configuration

Reference Links: https://www.cnblogs.com/yuer02/p/12613920.html

8) wait

Forced to wait: time.sleep (Time)

Implicit wait: driver.implicitle_wait (Time)

Explicit wait: WebDriverWait; usage reference Bowen: https://www.cnblogs.com/yoyoketang/p/6517477.html

Guess you like

Origin www.cnblogs.com/yuer02/p/12620988.html