Using Python bindings, Selenium WebDriver click() is not working sometimes.

后端 未结 7 1464
旧巷少年郎
旧巷少年郎 2021-02-02 12:27

I am trying to submit an input(type= button).But I am unable to update the value. Any help is appreciated. I have attached the testcase below for your reference.

7条回答
  •  礼貌的吻别
    2021-02-02 13:08

    You could try substituting .click() with .send_keys("\n"), which is equivalent to "Pressing enter while focusing on an element".

    So this:

    driver.find_element_by_link_text('PurchaseOrder').click()
    

    would become this:

    driver.find_element_by_link_text('PurchaseOrder').send_keys("\n")
    

提交回复
热议问题