Skip to content

How to use custom ResponseParser? #202

@onelesd

Description

@onelesd

The warning below is printed when an element is found on the page and is visible, but it's position shifts due to a changing DOM before the click() is executed.

find_element({:xpath, "//span"})
|> click()
16:33:06.734 [warn]  unknown error: Element <span>...</span> is not clickable at point (1153, 90). Other element would receive the click: <div></div>
  (Session info: chrome=63.0.3239.132)
  (Driver info: chromedriver=2.35.528157 (4429ca2590d6988c0745c24c8858745aaaec01ef),platform=Mac OS X 10.13.2 x86_64)

No exception is raised (unlike a click() of an element that is not visible, which raises "element is not visible"), so there is no way to catch this error and try again.

A kludge is to sample the element's location N times before attempting the click, but we still have a race condition that is prone to breakage.

Is there another technique?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions