VBA: the underlying connection was closed: unexpected error on a receipt

Asked

Viewed 480 times

1

I have a VBA project that interacts with web pages using the Seleniumwrapper reference. In Windows vista business the application works normally, however, in Windows 7 appears the error reported in the question title

Follows the code:

    Sub x()
        Dim objCollection
        Dim objCollection1 As Object
        Dim numeroPregao, dataAssinatura, uasg, item, val, m
        Dim c As Integer
        Dim ULogin As Boolean, ieForm
        Dim MyPass As String, MyLogin As String
        Dim driver As New SeleniumWrapper.WebDriver


        driver.Start "chrome", "http://comprasnet.gov.br" 'inicia o navegador                              
        driver.Open "/acesso.asp?url=/Livre/Ata/ConsultaAta00.asp" 'navega até a pagina

        Set objCollection = driver.findElementByCssSelector("frame[name='main2']") 'o erro ocorre aqui

the error is ejected last command, but the line driver. Open "/access.Asp? url=/Free/Ata/Consultat00.Asp" 'navigate to page. does nothing

1 answer

1


After much research I found the solution! The error was happening because Chrome had upgraded to the latest version and the Chromedriver I was using did not support this version of Chrome. I downloaded the new version of Chromedriver and pasted it into the Selenium folder and it worked perfectly

Chromedriver versions for download: https://sites.google.com/a/chromium.org/chromedriver/downloads

Browser other questions tagged

You are not signed in. Login or sign up in order to post.