'Need FindElementByCss to Return Collection of Elements
I'm trying to use the code snippet below to click a website button in Selenium. I adpoted it from an example I found on this site and working code that I previously used for IE. What can I use in place of FindElementByCss("idp").Text to return a collection of elements instead of a text string? Do I need to use anything in place of MyHTML_Element in the code below?
Set inputSelector = htmlDoc.FindElementByCss("idp").Text
For Each MyHTML_Element In inputSelector
If MyHTML_Element.className = "idp" Then
MyHTML_Element.Click: Exit For
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 |
|---|
