Hello Everyone,

Can anyone help me on below situation

i want to give detail in search box on the webpage, but once open the website i am getting error and not filling text in searchbox, below code which i am using.

Sub lookupTest()
    Dim appIE As InternetExplorerMedium
    'Set appIE = Nothing
    Dim objElement As Object
    Dim objcollection As Object
    Set appIE = New InternetExplorerMedium
    sURL = "https://www.example.com"
    With appIE
        .Navigate sURL
        .Visible = True
        Do While appIE.Busy Or appIE.ReadyState <> 4
    End With
    Set objcollection = appIE.Document.getElementsByTagName("input")
    i = 0
    While i < objcollection.Length
        If objcollection(i).id = "MscrmControls.Containers.RelevanceSearchControl-text-input-props" Then
            ' Set text for search
            objcollection(i).Value = "12345"
        End If
        Do While appIE.Busy Or appIE.ReadyState <> 4
        i = i + 1
    Set appIE = Nothing
    MsgBox (done)
End Sub

Element code is
"<input id="MscrmControls.Containers.RelevanceSearchControl-text-input-props" aria-label="Search box" data-id="MscrmControls.Containers.RelevanceSearchControl-text-input-props" placeholder="Search Dynamics 365 data" autocomplete="off" type="text" class="iq ct lt lu lv lw do lx if " value="">"