AHK, Selenium and Google Chrome (Error): Chrome changes its debug port randomly always when I try to connect to it

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Renets
Posts: 36
Joined: 12 Jul 2018, 13:11

AHK, Selenium and Google Chrome (Error): Chrome changes its debug port randomly always when I try to connect to it

03 Jul 2020, 12:33

So, I am able to use AHK, Selenium and Google Chrome in my computer without troubles, the thing is, that I am testing some web scraping code on a friend's computer and it just doesn't want to work

For a simple test code like this, it doesn't work

Code: Select all

oChrome := ChromeGet() ; Object for Chrome
MsgBox %  " "  oChrome.Url

return

; Connect with Chrome Function
ChromeGet(IP_Port := "127.0.0.1:9222") {
    oChrome := ComObjCreate("Selenium.ChromeDriver")
    oChrome.SetCapability("debuggerAddress", IP_Port)
    oChrome.Start()
    return oChrome
}


The errors looks like this:

https://imgur.com/SySISbZ

https://imgur.com/sKUH7CF

https://imgur.com/WGsmjWG



Note the port changes itself every time I try to connect to

I have already set the shortcut to chrome like this

Code: Select all

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" "--remote-debugging-port=9222"


and have tried another format like this:

Code: Select all

"C:\Program Files (x86\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 -- "%1")

"C:\Program Files (x86\Google\Chrome\Application\chrome.exe" -remote-debugging-port=9222")

But none seem to work

I already have Selenium Installed, .NET 3.5 Framework enabled, Latest Chrome Driver but it seems to be another thing

Any tips, suggestions or recommendations are welcome! Many Thanks!
gregster
Posts: 9111
Joined: 30 Sep 2013, 06:48

Re: AHK, Selenium and Google Chrome (Error): Chrome changes its debug port randomly always when I try to connect to it

03 Jul 2020, 13:19

Just a guess: Did you check that Chrome itself is up-to-date?
(and fits the Chromedriver version?)
Renets
Posts: 36
Joined: 12 Jul 2018, 13:11

Re: AHK, Selenium and Google Chrome (Error): Chrome changes its debug port randomly always when I try to connect to it

03 Jul 2020, 14:23

gregster wrote:
03 Jul 2020, 13:19
Just a guess: Did you check that Chrome itself is up-to-date?
(and fits the Chromedriver version?)
Yeah, Chrome is up to date and the latest ChromeDriver in the Selenium folder

It is sooooooooooooooooooo weird, I am looking everyone and it seems an isolated scenario, but that hurst because I really need the script to work on that computer.

So initially it was working well, but like 3 days after it started throwing that error :(

I am still researching as much s I can, any other consideration or guess is appreciated

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], oktavimark, Rohwedder and 263 guests