Theres a website I need to scrape some data from using vba selenium chrome. Website loads a table with ajax, and I can wait for the table to fully load, however, I cannot access the loaded elements. There are input fields and buttons I need to interact with, but I cannot access any of it, other than elements that loaded initially?
I used the code below just to confirm
For Each t In chrome.FindElementsByTag("input")
debug.print t.tagName
Next
There are 2 "input" fields on the website and it only finds the first one, not the other one loaded by ajax, obviously same goes for everything else. How can I access these elements?
I have found the solution, but if I'm completely honest, I'm not sure why it works. Its as simlpe as:
Set searchbar = chrome.FindElementByXPath("//input[@id='jpkm2']")
Does anyone know why this method allows me to access these elements, while looping through all elements on the page doesnt find it, and .FindElementById
throws "NoSuchElementFound" instead?