Get Element Value By Name
I'm trying to find a specific text value in my HTML page I'm trying to use the GetElementsByName ( as it does not have any ID ) x = msgbox('Wait for page to load',64, 'Job ID') Job
Solution 1:
Try x = msgbox((JobId(0).Value),64, "Job ID")
When you use the GetElementsByName tag, it will be returning back an array. If you only have one item with that name
tag, you can always use JobID[0] to reference it.
How ever if you are going to have more than one item, you will have to do some sort of loop
ForEach job in JobID
msgbox((job.Value),64, "Job ID")
Next
You could also do something like this
inputs = IE.Document.getElementsByTagName("input")
For Each inputin inputs
If input.type = "hidden" && input.name = "JobId" Then
msgbox((input.Value),64, "Job ID")
End If
Next
Post a Comment for "Get Element Value By Name"