microsoft / WinAppDriver

Windows Application Driver
MIT License
3.7k stars 1.41k forks source link

WinAppDriver switches focus from app to VS in debug #1583

Open valsoray14 opened 3 years ago

valsoray14 commented 3 years ago

Hello there,

I faced issue during the test run in Visual Studio debug mode that on the breakpoint driver loses focus from app and can not perform action because the focus switched to the VS when I try to proceed test debugging. Could you please advice how to avoid such issues in debug mode.

Thank you in advance

Shakevg commented 3 years ago

@valsoray14 I can suggest 2 options:

  1. Call Session.SetFocus(), but you need to call it each time
  2. Open the app on separate monitor