chromedriver.exe once and for all
Moderators: Dorian (MJT support), JRL
Re: chromedriver.exe once and for all
OK, our times are wildly different, I'll be back on tomorrow around 10AM, GMT +4 to check.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: chromedriver.exe once and for all
I've been thinking, could it be privileges causing the none communication with Chrome? You could perhaps compile a test exe yourself and test on a PC where you're sure to have full privileges.
Re: chromedriver.exe once and for all
Hi,
No, I'm running MS as administrator, and you'll also notice Chrome and chromedriver are launched by Admin user too.
No, I'm running MS as administrator, and you'll also notice Chrome and chromedriver are launched by Admin user too.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: chromedriver.exe once and for all
Instead of head banging with the current PC, try a second one and see how that one is behaving. It's currently just a guessing game.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: chromedriver.exe once and for all
The script is working fine for me.
I note also that the simple 3 line script is also failing. This would seem to suggest an issue with the Chrome setup. which version of Chrome are you running?
I note also that the simple 3 line script is also failing. This would seem to suggest an issue with the Chrome setup. which version of Chrome are you running?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: chromedriver.exe once and for all
Marcus, I understand how hard it is when you can't replicate a problem. I could create a login for you and let you on the machine. Want to try that?
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: chromedriver.exe once and for all
Ok. PM me login details.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: chromedriver.exe once and for all
details are there, thanks
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
Re: chromedriver.exe once and for all
Marcus, thanks very much for making that work, I very much appreciate your efforts to solve the issue. There are a couple things I wanted to bring to your attention:
1) I eliminated the chromedriver.exe popup by unchecking the box that said "run this dialog each time..."
2) I was looking through the script because I noticed that Chrome did not launch in a maximized window. I used the navigation icons to open the online help, and when Chrome started, it crashed. This was true regardless of whether I used the general help icon (black ? in yellow circle) or the contextual help icon. While new windows in that same crashed browser instance could open, all of them would crash too, even Chrome help and settings. It was the exact same behavior I noticed when I created this ticket. I mention this only because it seems to indicate a subtle incompatibility between your compiled code and Chrome, and I wonder if this also exists in the Chrome functions.
3) I was about to submit this ticket, but then I noticed something else. I ran the basic script again, the one where you open google.com, and it failed. The Chrome browser crashed again. A little trial and error reveals that these chrome scripts only work if chromedriver.exe is launched before the script is run. Also, it can't be just any chromedriver.exe that exists on the computer. It has to be either the one in the script folder, or the one in the MS15 program folder, even if the one I launch from another location is identical. Somehow, Chrome can tell the difference and it matters. Also, revisiting item #2 above, the editor HELP icons make the Chrome browser crash regardless of whether or not chromedriver is running, and no matter where it was launched from.
4) Experimenting a little further, I found that I didn't even need the CHROMEDRIVER commands. I could just run the script like this, as long as %SCRIPT_DIR%\chromedriver.exe was already running.
I suspect it's not supposed to behave like this. That said, even if it's a little finicky, you did get it working for me, so again, I appreciate that very much.
If you want, I've left the server running for you so you can see this behavior for yourself. I plan on shutting it down tomorrow, but if you'd like for me to leave it running longer, just PM me.
1) I eliminated the chromedriver.exe popup by unchecking the box that said "run this dialog each time..."
2) I was looking through the script because I noticed that Chrome did not launch in a maximized window. I used the navigation icons to open the online help, and when Chrome started, it crashed. This was true regardless of whether I used the general help icon (black ? in yellow circle) or the contextual help icon. While new windows in that same crashed browser instance could open, all of them would crash too, even Chrome help and settings. It was the exact same behavior I noticed when I created this ticket. I mention this only because it seems to indicate a subtle incompatibility between your compiled code and Chrome, and I wonder if this also exists in the Chrome functions.
3) I was about to submit this ticket, but then I noticed something else. I ran the basic script again, the one where you open google.com, and it failed. The Chrome browser crashed again. A little trial and error reveals that these chrome scripts only work if chromedriver.exe is launched before the script is run. Also, it can't be just any chromedriver.exe that exists on the computer. It has to be either the one in the script folder, or the one in the MS15 program folder, even if the one I launch from another location is identical. Somehow, Chrome can tell the difference and it matters. Also, revisiting item #2 above, the editor HELP icons make the Chrome browser crash regardless of whether or not chromedriver is running, and no matter where it was launched from.
4) Experimenting a little further, I found that I didn't even need the CHROMEDRIVER commands. I could just run the script like this, as long as %SCRIPT_DIR%\chromedriver.exe was already running.
Code: Select all
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
//MessageModal>%SCRIPT_DIR%
//Let>CHROMEDRIVER_EXE=%SCRIPT_DIR%\chromedriver.exe
//Let>CHROMEDRIVER_PORT=9515
//Let>CHROMEDRIVER_OPTIONS=--start-maximized
//GetProcessIDs>chromedriver.exe,beforePIDs
ChromeStart>SessionID
GetProcessIDs>chromedriver.exe,PIDs
ChromeNavigate>SessionID,url,https://www.google.com
If you want, I've left the server running for you so you can see this behavior for yourself. I plan on shutting it down tomorrow, but if you'd like for me to leave it running longer, just PM me.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
Re: chromedriver.exe once and for all
Grovkillen,
I just wanted to say that script of yours is genius. Thank you for that.
I just wanted to say that script of yours is genius. Thank you for that.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: chromedriver.exe once and for all
I didn't actually do anything aside from note that initially chrome and chromedriver were not at the same version level. Once that was sorted the scripts just ran without modification.
It isn't normally necessary to run chromedriver.exe first as Macro Scheduler will start it anyway. I've not seen that anywhere else. I wondered if it was because you have set Macro Scheduler to run as admin but I just tried that here and everything continued to work as expected.
Also not seen issues before with opening the help links etc from the editor. Just tried that too - with Chrome as my default browser. Tried it when starting Macro Scheduler as admin as well. Tried it after starting a chromedriver script and before. Couldn't get anything to crash. Just opened up the help links just fine.
So, I'm afraid your issues are something of a mystery. But at least it seems you can now get the scripts running.
It isn't normally necessary to run chromedriver.exe first as Macro Scheduler will start it anyway. I've not seen that anywhere else. I wondered if it was because you have set Macro Scheduler to run as admin but I just tried that here and everything continued to work as expected.
Also not seen issues before with opening the help links etc from the editor. Just tried that too - with Chrome as my default browser. Tried it when starting Macro Scheduler as admin as well. Tried it after starting a chromedriver script and before. Couldn't get anything to crash. Just opened up the help links just fine.
So, I'm afraid your issues are something of a mystery. But at least it seems you can now get the scripts running.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: chromedriver.exe once and for all
Thanks for looking into it. I have to believe this has a lot to do with Windows Server (NT) vs. Windows desktop. I assume you're running the latter. I can live with the way it works for now.
Thanks again.
Thanks again.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: chromedriver.exe once and for all
Glad to have helped.
-
- Newbie
- Posts: 2
- Joined: Fri May 21, 2021 2:16 am
Re: chromedriver.exe once and for all
Nice script, haven't run it yet but looks good, going to try to learn this program looks cool
- Grovkillen
- Automation Wizard
- Posts: 1131
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
Re: chromedriver.exe once and for all
The page stays blank issue could be related to the fact that some sites block the connection if they detect a automation tool (chromedriver in this case).