VBA Selenium从下拉菜单中选择一个值

时间:2020-09-20 01:25:10

标签: vba selenium dropdown findelement

,谢谢您的阅读。 硒新手(仅4天) 我想从图像中突出显示的下拉部分中选择一个值。我需要为下拉菜单选择值“ Late Speed”,但是我认为这是一个动态下拉菜单(?)

enter image description here

enter image description here

我一直在玩下面的代码,但是运气不好。

For Each tr2 In driver.FindElementsByClass("sectional-filters")

  For Each td2 In tr2.FindElementsByClass("sectional-filters__select")
  Debug.Print td2.Text

  If InStr(td2.Text, "Late Speed") > 0 Then
    tr2.FindElementsByTag("id").Click
    tr2.FindElementByClass("sectional-filters__select").Click
    
  End If
Next td2

0 个答案:

没有答案
相关问题