K
K
Koe_kto2016-02-12 00:33:36
Python
Koe_kto, 2016-02-12 00:33:36

Clicks don't work in Selenium, huh?

Good afternoon / evening, I immediately apologize if my question is amateurish.
The bottom line is this: there is a site ( lichess ), using python + selenium I go to it, after which I switch to playing with a computer. When you try to interact with the shapes, the result does not follow. The script fired by the mouse performs its actions but the shapes do not respond to these actions. Moreover, if you intervene in the process and move some figure on your own, then everything starts to work, and the previous instructions that did not work before begin to work properly. I also tried to act through ActionChains, the result is similar.

from selenium import webdriver

driver = webdriver.Firefox()
driver.get("http://ru.lichess.org/setup/ai")

driver.find_element_by_xpath("//label[@for='level_8']").click()
driver.find_element_by_xpath("//div[@class='color_submits']/button[1]").click()

#На следующую инструкцию фигуры не реагируют
driver.find_element_by_xpath("//square[53]").click()

selenium-2.51.1
Firefox v.43.0
What am I doing wrong?
thank you in advance for your understanding.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VZVZ, 2016-02-12
@VZVZ

What am I doing wrong?
Picked up inches and think that now you can write any bot.
Horseradish.
Master HTTP and Fiddler, this is a universal option (except for rare cases when the site uses TCP sockets, or some kind of RTMP from Adobe - then you need to dig even deeper, although this is still far from the deepest), although very gemorno.
Practice in website development (both front-end and back-end) is also needed a lot and in different languages. It is foolish to hope to become a bot grower, a reverse engineer, a hacker, while not being able to perfectly create what you want to hack.
Only then you can take on high-level things like Selenium, PhantomJS, and then not always use them, sometimes HTTP requests are better.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question