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

double click not working on JAB element #71

Open
karges612 opened this issue Feb 3, 2024 · 3 comments
Open

double click not working on JAB element #71

karges612 opened this issue Feb 3, 2024 · 3 comments

Comments

@karges612
Copy link

there is an option to single click but double click is not working.

@gaozhao1989
Copy link
Owner

You may available to run win32 function again for double click
def click_mouse(x: int, y: int, hold: int = 0, button: str = "left") -> None: mouse_down_act = ( win32con.MOUSEEVENTF_LEFTDOWN if button == "left" else win32con.MOUSEEVENTF_RIGHTDOWN ) mouse_up_act = ( win32con.MOUSEEVENTF_LEFTUP if button == "left" else win32con.MOUSEEVENTF_RIGHTUP ) win32api.SetCursorPos((x, y)) win32api.mouse_event(mouse_down_act, x, y, 0, 0) if hold: time.sleep(hold) win32api.mouse_event(mouse_up_act, x, y, 0, 0)

@karges612
Copy link
Author

karges612 commented Feb 28, 2024 via email

@gaozhao1989
Copy link
Owner

The simple way is try to click same element twice.
For example:
element = self.find_element(xxxx)
element.click()
element.click()

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

2 participants