'How to initiate click method td element using XPATH, Imports SHDocVw, Imports mshtml,
The web element is a table. I manage to get the data inside of it but clicking it is not working. Tried changing the class but it doesn't work. I already got the XPATH it's just that I'm not familiar how to execute the click method.
Dim clickMethod As IHTMLElementCollection = HTMLDoc.getElementsByTagName("td")
For Each element As IHTMLElement In clickMember
If element.getAttribute("title") = " " & lblFirstName.Text & " " Then
element.removeAttribute("class")
element.setAttribute("class", "button button-green default-button")
element.click()
End If
Next
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
