Hello,
I am trying to automate an interface to this website:
http://www.class.noaa.gov/nsaa/products/upload which conforms to the
DOM.
I have managed to login and to load all document elements into an
object collection, but am having difficulties interacting with these
elements beyond the .Click() method.
1) Presuming I have loaded all elements on the page into oCollection. I
then try to search through the elements Name property to match
"uploaded_file" which is the input_file object.
iCount = 0
Do
Set oElement = oCollection(iCount)
iCount = iCount + 1
Loop Until oElement.Name = "uploaded_file"
The above code does not work. Is it because some elements on the page
do not have a Name property? How to Fix?
2) If I manage to find the correct object will the following code be
enough to set the file to upload and move on to the next page?
oElement.Value = filename
oElement.Click()
3) Is there a more simple way to set/get element name/property pairs
that having to parse the entire page? I know the element's name is
"upload_file".
4) There are two submit button on the page, but only one is named. How
do I find and activate the unnamed one?
5) Is it better to use the Microsoft.XMLHTTP object for my purposes?
6) Can anyone point me to an online reference relevant to what I am
trying to do that is more illustrative than the MSDN pages? I do not
know exactly what the topic should be. Is it DOM, ASP or something
else? I need a gentle primer.
Thanks