D
D
Denis99992016-03-02 21:49:36
Python
Denis9999, 2016-03-02 21:49:36

Click on coordinates in Selenium Webdriver Python?

You need to click on the coordinates on the site using Selenium Webdriver Python.
I got this code:

driver = webdriver.Firefox()
driver.get("http://localhost/pythontest.com/")
actions = ActionChains(driver)
actions.move_by_offset(100, 100).click()

It works and nothing happens, even though the test site has a full-screen link. I'm not strong in English, I deal with the documentation with a translator.
Is it possible to find out the mouse coordinates, maybe I'm clicking in the wrong place?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis9999, 2016-03-02
@Denis9999

it was necessary to add perform();
working version:

actions = ActionChains(driver)
actions.move_by_offset(100, 100).perform()
time.sleep(5)
actions.click().perform()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question