Work on via for excel not in VB 6.0 chrome and selenium

User avatar
sal21
PlatinumLounger
Posts: 4605
Joined: 26 Apr 2010, 17:36

Work on via for excel not in VB 6.0 chrome and selenium

Post by sal21 »

installed Selenium driver and Cromedriver, this code work perfect on VBA for Excel, but in VB 6.0 have this error (see image in previus post)

Sub TEST_CHROME()

Dim BOT As New WebDriver
Dim rowc, cc, columnC As Integer
BOT.start "Chrome" '<<<<< error here
BOT.Get "https://demo.istat.it/app/?i=D7B&l=it&a=2024"

BOT.FindElementById("tab-1").SendKeys ("Vista territoriale")
BOT.FindElementById("provincerb-1").SendKeys ("Tutti i comuni della provincia selezionata")
BOT.FindElementById("btnricerca-1").SendKeys("Cerca").Click

End Sub

User avatar
SpeakEasy
5StarLounger
Posts: 753
Joined: 27 Jun 2021, 10:46

Re: Work on via for excel not in VB 6.0

Post by SpeakEasy »

Suggests you may be using the wrong selenium type library with VB6

Just a couple of questions:
a) do you have the latest webdriver for Chrome (ChromeDriver)?
b) Are you using SeleniumBasic? Or some other odd Selenium library?

User avatar
sal21
PlatinumLounger
Posts: 4605
Joined: 26 Apr 2010, 17:36

Re: Work on via for excel not in VB 6.0

Post by sal21 »

SpeakEasy wrote:
05 Nov 2024, 10:03
Suggests you may be using the wrong selenium type library with VB6

Just a couple of questions:

a) do you have the latest webdriver for Chrome (ChromeDriver)? yes 32bit
b) Are you using SeleniumBasic? Or some other odd Selenium library? yes the last SeleniumBasic
but why in excel vba work perfect(!?)

User avatar
SpeakEasy
5StarLounger
Posts: 753
Joined: 27 Jun 2021, 10:46

Re: Work on via for excel not in VB 6.0 chrome and selenium

Post by SpeakEasy »

>why in excel vba work perfect

Can't tell you. The code (or at least a version of the code) works fine for me in both VB6 and VBA. This suggest that there is something different about your VB6 setup, but what that might be is unclear (hence the educated guess at the library version).