webdriervAPI (simple elements to control the browser and operating)

from  selenium  import  webdriver

driver  =  webdriver.Chorme()

driver.get("http://www.baidu.com")

 

Control window size (480) represented by the browser width, (800) indicates a high browser

driver.set_window_size(480, 800)

 

Control of the browser forward and backward

driver.back () Back

driver.forward () forward

 

Analog Refresh your browser

driver.refresh () to refresh the current page

 

"" "Simple elements operating" ""

clear () Clear text

send_keys ( "") key input analog

click (), click the element

Guess you like

Origin www.cnblogs.com/97xiaolai/p/11707098.html