VBA Code to Access Chrome HTML Elements

3,443 views
Skip to first unread message

Rushikesh Aher

unread,
Oct 22, 2019, 11:55:37 AM10/22/19
to Chromium-dev

I want to use ie.document.getElementByID('id').value to get or set value to text field. I have a code for internet Explorer but i want to apply it on Google Chrome. Without opening new page or new tab of Chrome


    Set objshell = CreateObject("Shell.Application")
    IE_count = objshell.Windows.Count
    For x = 0 To (IE_count - 1)
        On Error Resume Next    ' sometimes more web pages are counted than are open
        my_url = objshell.Windows(x).document.Location
        my_title = objshell.Windows(x).document.Title

            If my_title Like "IE" & "*" Then 'compare to find if the desired web page is already open
                Set ie = objshell.Windows(x)
                MsgBox ie.document.getelementById("id").Value
                Exit For
            End If
       
    Next


Jeremy Roman

unread,
Oct 25, 2019, 4:29:47 PM10/25/19
to rushikes...@gmail.com, Chromium-dev
Unfortunately this is a mailing list for development of the Chromium browser project, not a support forum. I suspect, as well, that Chrome does not support VBA scripting.

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/b4d3d72d-bd3c-47d8-ac85-82a3b9727063%40chromium.org.
Reply all
Reply to author
Forward
0 new messages