Hi there,
I am looking to create a small utility which 'scrapes' data from one IE session, and pastes that to another form in a seperate IE session. The difficulty I am having is that the administrator has locked access to the source and as such I am unable to inspect the HTML code directly in order most effectively build the solution.
I am aware that the use of the DOM would prove helpful to locate the nth input field, and then sets its values. Having researched the topic somewhat using the search I am struggling to come up with a working model on best to achieve this.
I am currently concentrating on the section of code which will paste the values into the IE page containing the form. This page appears to utilise frames; a top nav bar, a left menu section and the main frame which contains the fields which need to be completed. As I do not have access to the code directly, I guess I need to be able to reference the frames by number (i.e, the third frame) and then 'guess' the input field number within the DOM tree. This is where I am really struggling.
The examples I have found online make the assumption that I know the frame name and corresponding input names. I have neither.
This code looked promising,
However, I don't have the frame or form input names.
I would be grateful for any help.
I am looking to create a small utility which 'scrapes' data from one IE session, and pastes that to another form in a seperate IE session. The difficulty I am having is that the administrator has locked access to the source and as such I am unable to inspect the HTML code directly in order most effectively build the solution.
I am aware that the use of the DOM would prove helpful to locate the nth input field, and then sets its values. Having researched the topic somewhat using the search I am struggling to come up with a working model on best to achieve this.
I am currently concentrating on the section of code which will paste the values into the IE page containing the form. This page appears to utilise frames; a top nav bar, a left menu section and the main frame which contains the fields which need to be completed. As I do not have access to the code directly, I guess I need to be able to reference the frames by number (i.e, the third frame) and then 'guess' the input field number within the DOM tree. This is where I am really struggling.
The examples I have found online make the assumption that I know the frame name and corresponding input names. I have neither.
This code looked promising,
Code:
Dim HTMLDoc2 As MSHTML.HTMLDocument
Set HTMLDoc2 = Browser.document.frames(2).document
' Fill in values
HTMLDoc2.forms("NavPage").CNum.Value = "12345" 'will change this to become a variable
HTMLDoc2.forms("Navpage").GetCase.Click
However, I don't have the frame or form input names.
I would be grateful for any help.