webdriervAPI (WebElement Common Interface Method)

from  selenium  import  webdriver

driver  =  webdriver.Chorme()

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

 

submit () method is used to submit the form

    Sometimes submit () can be click () is used interchangeably, submit () can also submit a button, but submit () application range far and click ()

obj  =  driver.find_element_by_name(" ").submit()

obj.size get the size of the elements

obj.text get the text elements

obj.get_attribute ( "id") Gets the id attribute value of

obj.is_displayed () Gets the result element is visible, returns a value of True or False

Guess you like

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