How can I switch iframe using selenium vba?

前端 未结 2 1002
故里飘歌
故里飘歌 2021-01-27 18:43

Writing a script in vba using selenium for the purpose of switching iframe when I run it, I get an error: object doesn\'t support this property. How can I do it if I take the be

2条回答
  •  迷失自我
    2021-01-27 19:36

    According to the suggestion given by @Mathieu Guindon, the solution should be like below (working one).

    Sub HandleIframe()
        With New ChromeDriver
            .get "http://hcad.org/quick-search/"
            .SwitchToFrame .FindElementByTag("iframe", timeout:=10000)
            .FindElementById("acct").SendKeys "8227"
            .FindElementByCss("input[value='Search']").Click
        End With
    End Sub
    

提交回复
热议问题