Skip to content

Mouse not working on OSX? #133

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

Closed
shirshak55 opened this issue May 11, 2020 · 5 comments
Closed

Mouse not working on OSX? #133

shirshak55 opened this issue May 11, 2020 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@shirshak55
Copy link

In OSX it is not giving error but also doing nothing however finding image on screen does give correct pixel. Is it some sort of permission issue?
Code

  console.log(await mouse.move(right(500)))
  console.log(await mouse.move(right(500)))

doesn't move mouse but gives the following result.

Mouse {
  native: NativeAdapter {
    clipboard: ClipboardAction {},
    keyboard: KeyboardAction {},
    mouse: MouseAction {}
  },
  config: { autoDelayMs: 100, mouseSpeed: 1000 }
}
Mouse {
  native: NativeAdapter {
    clipboard: ClipboardAction {},
    keyboard: KeyboardAction {},
    mouse: MouseAction {}
  },
  config: { autoDelayMs: 100, mouseSpeed: 1000 }
}
@shirshak55
Copy link
Author

will test on windows and let u know

@s1hofmann s1hofmann added the question Further information is requested label May 11, 2020
@s1hofmann s1hofmann self-assigned this May 11, 2020
@s1hofmann
Copy link
Member

s1hofmann commented May 11, 2020

Hi @shirshak55,

you're right, mouse / keyboard access on macOS requires accessibility permissions.
If an application wants to use accessibility features, a permission pop-up should be shown.
If not, you could try to manually add the application you're running the script from.

Settings -> Security & Privacy -> Privacy -> Accessibility -> Add...

You could add e.g. iTerm2 to the list of applications.

@shirshak55 shirshak55 changed the title How to use it ? Mouse not working on OSX? May 11, 2020
@shirshak55
Copy link
Author

Thanks Updated title so it will be helpful to others too.

@shirshak55
Copy link
Author

shirshak55 commented May 11, 2020

@s1hofmann hey there. I don't see cursor moving but sure it moves invisibly is there way to make movement visible just so we know where mouse is before doing mouse.leftClick() ?

@s1hofmann
Copy link
Member

Hi @shirshak55,

how are you connected to your system?
I can't reproduce this behaviour on my machine.
However, I do know that this behaviour occurs when working in a VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants