Selenium - Click at certain position

后端 未结 4 1664
既然无缘
既然无缘 2020-12-08 15:13

Using the Python version of Selenium, is it possible to click some element in the DOM and to specify the coordinates where you want to click it? The Java version has the met

4条回答
  •  鱼传尺愫
    2020-12-08 15:54

    The reason you are getting confused is clickAt is an old v1 (Selenium RC) method.

    WebDriver has a slightly different concept, of 'Actions'.

    Specifically, the 'Actions' builder for the Python bindings live here.

    The idea of the clickAt command is to click at a certain position relative to a particular element.

    The same is achievable within the WebDriver, using the 'Actions' builder.

    Hopefully this updated documentation can help.

提交回复
热议问题