mercredi 23 janvier 2019

reading the elements of 2nd page after submit click

I am working on a web form fill using excel cells data, and the issue here is that after filling the text in the first page using the elements ID, when it click on Submit it loads a new IE.

Now here I am not able to fill the text using the elements ID etc, as its (VBA) not identifying it or not considering it.

IE Page loads properly here no issue. Kindly suggest

Sub Test1() Dim IE As Object Dim doc As HTMLDocument Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True IE.navigate "https://xyz" frmTarget=New&Text_ident=002719&frmOption=CREATE" Do While IE.Busy Application.Wait DateAdd("s", 1, Now) Loop Set doc = IE.document 'IE.document.getElementById().Value="test" 'doc.getElementById("ui-new_widget-1_new_company_12").Value = ThisWorkbook.Sheets("Data").Range("A2").Value doc.getElementById("ui-new_widget-1_monitor_12").Value = ThisWorkbook.Sheets("Data").Range("A2").Value doc.getElementById("new_date").Value = "2019-01-19" 'ThisWorkbook.Sheets("Data").Range("c2").Value doc.getElementById("new_no_mail").Click IE.document.forms(0).submit End Sub

... ...

It submit the 1st page with the Text data from excel, but issue with the 2nd page which loads




Aucun commentaire:

Enregistrer un commentaire