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 below example as consideration.
Sub HCAD()
Dim driver As New ChromeDriver
driver.Get "http://hcad.org/quick-search/"
driver.Wait 500
driver.SwitchToFrame (driver.FindElementByTag("iframe"))
End Sub
Here is the script with which i was trying to get the name of the address from the target page. Turn out when i reach there i faced another iframe so end up getting nothing. There is only one name against the address i mentioned in my script.
Sub HCAD()
Dim driver As New ChromeDriver
Dim post As Object
driver.Get "https://public.hcad.org/records/quicksearch.asp"
driver.Wait 500
driver.FindElementById("s_addr").Click
driver.FindElementByName("stnum").SendKeys ("8227")
driver.FindElementByName("stname").SendKeys ("FINDLAY ST")
driver.FindElementByXPath("//input[@value='Search']").Click
driver.Wait 1000
Cells(1, 1) = driver.FindElementByXPath("/html/body/table/tbody/tr/td/table[5]/tbody/tr[2]/td[1]/table/tbody/tr/th").Text
End Sub