Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider changing element.click() to def click(*, xoffset=None, yoffset=None) #515

Open
yashaka opened this issue Feb 28, 2024 · 3 comments
Assignees

Comments

@yashaka
Copy link
Owner

yashaka commented Feb 28, 2024

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 be int and 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()
@yashaka
Copy link
Owner Author

yashaka commented Feb 28, 2024

should not we then do the same with element.hover() ?

@yashaka
Copy link
Owner Author

yashaka commented Mar 3, 2024

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

@yashaka yashaka self-assigned this Mar 3, 2024
yashaka added a commit that referenced this issue Mar 4, 2024
github-actions bot added a commit that referenced this issue Mar 4, 2024
yashaka added a commit that referenced this issue Mar 4, 2024
@yashaka
Copy link
Owner Author

yashaka commented Mar 4, 2024

implemented but yet not tested with Appium :)

yashaka added a commit that referenced this issue Mar 6, 2024
... as it has not been fully working in context of autocompletion for now (waiting for #518 to progress on this)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant