It is a very common and, sometimes, difficult to spot problem when "action chains" are defined but not being actually applied. Example:
# incorrect
ActionChains(driver).move_to_element(some_element).click(some_element)
as opposed to:
# correct
ActionChains(driver).move_to_element(some_element).click(some_element).perform()
^^^^^^^^^
ActionChains would essentially do nothing and perform no action without perform()
.
Is there a way to catch this type of a problem early with static code analysis?
I've also looked if PyCharm would warn about this, but it reports no suspicious code found which is understandable as without the perform()
call it is still a perfectly valid Python.
There is also this missing-perform
ESLint rule.
perform()
. This is not a problem, this is logic. It's like in SQLcommit
afterexecute
– Touber