0

So, I am trying to use UI Automation(Specically White library) to simpulate multiple automations at the same time. I would not like my mouse to be taken over. Is there anyway to do this? Basically, I want an instance of my UI Automation to use a virtual mouse specifically for that program, instead of my main mouse.

1 Answers1

0

Not really clear on what you mean. The White library uses UI Automation elements to interact with desktop applications. Once you capture the element you can send any sort of command to it you like such as click and it won't actually use your existing mouse to click on it. Sounds like you are automating your mouse instead of automating the application.

Dmitry K.
  • 972
  • 6
  • 16
  • var menu = _application.GetWindows()[0].MenuBar.MenuItem("Connection", "Login"); menu.Click(); This takes my mouse and this passBox.SetValue("mypass"); – Brian Jones Apr 15 '16 at 03:19
  • It's been a while since I've used White but you can call RaiseClickEvent on a UI item if it supports the InvokePattern. Source: http://teststackwhite.readthedocs.org/en/latest/AdvancedTopics/MouseAndKeyboard/ – Dmitry K. Apr 15 '16 at 03:34
  • Thanks, however I changed to that and it still took my mouse. – Brian Jones Apr 15 '16 at 03:46
  • 1
    RaiseClickEvent() uses InvokePattern, which doesn't use mouse. – unickq Apr 15 '16 at 09:55