1

I'm facing difficulty in getting the requisite data and entering the captcha system in this website https://einvoice1.gst.gov.in/Others/EinvEnabled

I need to input the GSTIN from an Excel sheet and enter the Captcha and extract the data inside the final result page.

27AABCC6610Q1ZE
09AAFCS7675H1ZS
06AACCA4260B1ZC
and so on

There are 1000's of GSTIN

I want to give a timeframe of 15 seconds to enter the Captcha manually in case it is not possible through macros.

Sub OpenHyperlinkInChrome()
 Dim chromeFileLocation As String
  Dim hyperlink As String
  hyperlink = "https://einvoice1.gst.gov.in/Others/EinvEnabled"
  chromeFileLocation = """C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"""
  Shell (chromeFileLocation & "-url " & hyperlink)
  
    DoEvents
    Range("A2").Select

Do Until IsEmpty(ActiveCell)

    Application.Wait Now + TimeValue("00:00:15")
    
    IE.document.all("GSTIN").Value = ActiveCell.Value
    
    Set tags = IE.document.getElementsByTagName("Input")
    For Each tagx In tags
        If tagx.Value = "Next" Then
            tagx.Click
            Exit For
        End If
    Next

Loop

End Sub
Community
  • 1
  • 1
Leha Jain
  • 11
  • 1
  • You can't change from IE to Chrome in that way. Chrome has no interface for VBA. To use Chrome, you must use SeleniumBasic too. Look here how to install in the accepted answer of Yasser Khalil https://stackoverflow.com/questions/57216623/using-google-chrome-in-selenium-vba-installation-steps – Zwenn Jul 20 '22 at 16:17

0 Answers0