question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimize WinAppDriver.exe programmatically

See original GitHub issue

is there any argument that can be passed to WinAppDriver.exe while launching such that it opens it in a minimized way?

Note, that I tried this on command prompt and it works fine start "" /min "C:\Program Files\Windows Application Driver\WinAppDriver.exe" but, I am using psexec, and the same command, when used with psexec, doesn’t work. PsExec.exe -nobanner -accepteula -i 1 \\localhost -u username -p password "start \"\" /min \"C:\Program Files\Windows Application Driver\WinAppDriver.exe\""

PsExec could not start start "" /min "C:\Program Files\Windows Application Driver\WinAppDriver.exe" on localhost:
The filename, directory name, or volume label syntax is incorrect. 

So, it would have been altogether easier if there is any argument that WinAppDriver can take while launching it from the command prompt. It will be really helpful, considering WinAppDriver is used for automation (hence programmatically), and since it’s related to UI, it would be helpful to open it in a minimized state so that it doesn’t hinder UI elements on the screen.

How do you all approach this problem?

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
anunay1commented, Apr 21, 2022

Is its C# then using system.process you can launch WAD in minimize mode

0reactions
anunay1commented, Apr 21, 2022

try this

import subprocess

def startProgram():
    SW_MINIMIZE = 6
    info = subprocess.STARTUPINFO()
    info.dwFlags = subprocess.STARTF_USESHOWWINDOW
    info.wShowWindow = SW_MINIMIZE
    subprocess.Popen(r'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe', startupinfo=info)

startProgram()
Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Automate Desktops Apps Using WinAppDriver
Rather than starting WinAppDriver.exe from the machine manually, it is better to instantiate WinAppDriver programmatically.
Read more >
Appium/WinAppDriver in C#: How to minimize the console ...
I am automating a desktop UI using Appium/WinAppDriver with Visual Studio ... I tried the solution here: Minimize Console at app startup C#....
Read more >
How to Handle Windows-based Popups Using ...
1. Start the WinAppDriver server by running the winappdriver.exe file. · 2. Create a Java Maven project and add the following dependencies: ·...
Read more >
Windows Application Driver (WinAppDriver) With C# ...
Open WinAppDriver.exe from the installation directory (C:\Program Files (x86)\Windows Application Driver). After That, WinAppDriver will be ...
Read more >
Most Complete WinAppDriver C# Cheat Sheet
Download the most complete WinAppDriver C# cheat sheet. All you need to know – from basic to the most advanced configurations.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found