09-25-2012, 12:44 PM
sample code:
Code:
Function GetPageAllStringA(obj)
' to escape invisible object, very difficult
' If lcase(obj.body.style.visibility) = "hidden" or lcase(obj.body.style.display) = "inline-block" Then
' GetPageAllStringA = ""
' Exit Function
' End If
Set objChildren = obj.childNodes
If objChildren.length = 0 Then
GetPageAllStringA = obj.innerText
Exit Function
End If
For i = 0 to objChildren.length - 1
set obj = objChildren.item(i)
GetPageAllStringA = GetPageAllStringA & vbcrlf & obj.innerText
Next
End Function
str = GetPageAllStringA(Browser("Google").Page("Google").Object)
msgbox str