asibin2000
Programmer
I'm using AxInterop.SHDocVw as my browser.
I'm able to run this code:
No problem on this web application page we are automating.
The 2nd page opens and has the same type of code (lots of imbedded Javascript type code updating values).
When I run the above code and just cycle through the elements.. I get ZERO. So there is obviously something protecting this page from doing this kind of thing. If I view the code of the webpage that has ZERO "input" elements - I see several "input" elements.. but I can't access / reference them like I can from other pages.
So a few questions:
1. Has anyone ever stumbled across this problem before?
2. I'm thinking that the web app elements are being displayed through an overall single table?? So when I scan the page for "input" elements it says none? But I can't figure out if this is some kind of Javascript security thing or something new.
3. Could they be putting the input elements in some kind of sub form?
thanks in advance for any advice!
Lee
I'm able to run this code:
Code:
objDoc = WebBrowser1.Document
' Create a collection of all the "input" elements in the page.
Dim wbrAll As mshtml.IHTMLElementCollection = objDoc.getElementsByTagName("input")
' Create an object that will be a single instance of an input element
Dim wbrElm As mshtml.IHTMLElement
' Create a few variable to hold values from the input element
Dim strName As String
Dim strId As String
Dim strvalue As String
Dim strType As String
For Each wbrElm In wbrAll
' Assign the inner html values of the input to our variables
strName = wbrElm.getAttribute("name")
strId = wbrElm.id
strvalue = wbrElm.innerText
strType = wbrElm.getAttribute("type")
If strName = "user" Then
wbrElm.innerText = "testuser"
End If
Next
No problem on this web application page we are automating.
The 2nd page opens and has the same type of code (lots of imbedded Javascript type code updating values).
When I run the above code and just cycle through the elements.. I get ZERO. So there is obviously something protecting this page from doing this kind of thing. If I view the code of the webpage that has ZERO "input" elements - I see several "input" elements.. but I can't access / reference them like I can from other pages.
So a few questions:
1. Has anyone ever stumbled across this problem before?
2. I'm thinking that the web app elements are being displayed through an overall single table?? So when I scan the page for "input" elements it says none? But I can't figure out if this is some kind of Javascript security thing or something new.
3. Could they be putting the input elements in some kind of sub form?
thanks in advance for any advice!
Lee