selene
selene copied to clipboard
consider changing element.click() to def click(*, xoffset=None, yoffset=None)
subj :)
while implementing think on the following:
- should work with Appium too
- let's compare how is it implemented in playwright - can we steal some good ideas from it?
- should we make such options of type:
int | None, or is it enough to beintand just use 0 for same reason as None is used... kind of... do we really need None here? (to switch the implementation of the method between normal webelement.click() and actions.move_to_element_with_offset(...).click().perform()
should not we then do the same with element.hover() ?
Here's how Playwright does it:
# Click the top left corner
page.get_by_text("Item").click(position={ "x": 0, "y": 0})
– this does not help us much... nothing to follow... because it does not use offset from center, it uses absolute values starting from top left corner... and also using dict is far from perfect, because we have to use "more symbols" when writing :p
implemented but yet not tested with Appium :)