Selenium click x y coordinates with python

Hi

Can anyone help me with an example how to use selenium to click x y coordinates using python ?

Thank you.
Tanya K.

Hi Tanya,

Is this what you are looking for : Click Element At Coordinates?

I’m not really sure what your asking as you can use selenium keywords directly in Robot Framework, so not sure why you want to use python?

Can you explain a bit more what you are wanting to achieve?

Dave.

1 Like

I mean I’m using selenium with python, I’m sorry for the confusion.
I tried “Click Element At Coordinates” but it doesn’t go to the right coordinates of x,y,
it clicked in the same location always I don’t know why.

Hi Tanya,

I’ve not needed Click Element At Coordinates before, but from the doc it clicks a point relative to the locator, what did you use as the locator and what are you trying to click?

if you can provide a link or a screen shot i’ll have something to reference when trying to help, also if you can post the script of what you have tried, then I can make some suggestions.

Dave.

Hi
You could also try the WebDriver ActionChains method “move_to_element_with_offset” and use the body as the element.