Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
ocnuybear
- Pro Scripter
- Posts: 100
- Joined: Sun Jul 15, 2018 5:14 pm
Post
by ocnuybear » Wed Feb 02, 2022 8:34 am
Hi there,
Want to automate Chrome & chromedriver is started first, but needs the the chromedriver.exe cmd window to be minimized in the background.
Code: Select all
ProcessExists>chromedriver.exe,bDriverExists
If>bDriverExists=False
Run>c:\chromedriver.exe
WindowAction>2,C:\chromedriver.exe
Endif
Have checked there is only one instance of chromedriver running in task manager as well as restarted MS
-
Dorian (MJT support)
- Automation Wizard
- Posts: 1356
- Joined: Sun Nov 03, 2002 3:19 am
-
Contact:
Post
by Dorian (MJT support) » Wed Feb 02, 2022 9:30 am
I had the same results, which is odd as the window title seems correct. I had the same results even if i used a wildcard. But if I wait for the window to open, set focus, wait for focus and then get active window, it seems to correctly minimize 100% of the time. N.B it was successful whether I used an upper or lower case c for C:\
Code: Select all
ProcessExists>chromedriver.exe,bDriverExists
If>bDriverExists=False
Run>c:\chromedriver.exe
WaitWindowOpen>c:\chro*
SetFocus>c:\chro*
WaitWindowFocused>c:\chro*
GetActiveWindow>WT,XX,YY,WW,HH
WindowAction>2,%WT%
Endif
Yes, we have a
Custom Scripting Service. Message me or go
here