If you try the code I posted earlier (below) in the VFP window you should get hints for the DOM pem's. GetElementByTagName() should return a list, it may also be possible to check the Type attribute of each element.

The DOM is a mess imho - good luck.
... more at:
http://www.w3schools.com/jsref/met_document_getelementsbytagname.asp

LOCAL loIE as InternetExplorer.Application
LOCAL oDoc as InternetExplorer.Document
LOCAL oFm as html.form
loIE = CREATEOBJECT("InternetExplorer.Application")
? loIE.Navigate2("http://www.universalthread.com";)
oDoc = loIE.Document
oFm = oDoc.getElementById("Form1")
* oUID = oFm.getelementsbyname("Username")  && nope
oUID = oDoc.getelementsbyname("Username") && OK - but it returns a list - so:
oUID1 = oUID.item(0)
?oUid1.value                                && empty
oUid1.value = "fooYou"
?oUid1.value                                && fooYou
* oPW = oFm.getelementsbyname("Password")   && nope
oPW = oDoc.getelementsbyname("Password")    && OK - but ...
oPW1 = oPW.item(0)
?oPW1.value                                 && empty
oPW1.value='pw'
?oPW1.value                                 && pw
loIE.Visible = .T.                          && like I told ya'
?oFm.submit                                 && NO
?oFm.submit()                               &&
oFm.submit()                                && WAY
oDoc.getElementById('Form1').submit()       &&
oDoc.getElementById('Form1').submit         &&
oFm = oDoc.getElementById("Form1")          && JOSE
oFm.submit                                  &&
loIE.Quit
CLOSE ALL
CLEAR ALL
RELEASE ALL
CLEAR


  AndyD

On 16/02/2014 07:50, Joe Yoder wrote:
I am trying to come up with code that can look at an HTML document and
produce  a list of fields that will accept data, buttons and check boxes
that can be clicked, and dropdowns that can have a value selected.

I see references to XML  as a similar scheme to DOM and wonder if they talk
to each other.  I've never used the XML capabilities in VFP so that
probably compounds my confusion.

The IDE seems to know something about the DOM as entering a dot after the
name of an object created from Internet Explorer Automation yields a
dropdown list of suggestions.  After selecting document, for example,
entering another dot gives the same list of suggestions so I've not figured
out how to tell what combinations are compatible.

If one attempts to examine a DOM object via display memory, VFP shows it as
a local object with "UNKNOWN TYPE dom"  Thus it appears to recognize it as
Document Object Model but declares it to be  an unknown type.

Any code, suggestions, or encouragement will be welcome!

Joe


--- StripMime Report -- processed MIME parts ---
multipart/alternative
   text/plain (text body -- kept)
   text/html
---

[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to