I"m trying to cram data on https://finance.yahoo.com/. I found that if you type a few letters in the search bar, there will be a result that suggests popping up. Similar to Google and Baidu.
I want to get down on my stomach with this suggestion. I found a list element whose child elements should be suggestions.
/ / * [@ id= "search-assist-input"] / div [2] / ul
however, when I use Firefox or Chrome to look at the child elements of this element, the suggestion automatically disappears, and then the element automatically has no child elements.
I try to select all the child elements directly with selenium, showing that there are no elements.
the Chrome here is a class I made, and basically wrapper, returns a selenium chrome webdriver with get_driver
from chrome_driver.chrome import Chrome
driver = Chrome().get_driver()
driver.get("https://finance.yahoo.com/")
driver.find_elements_by_xpath("//div[@id="search-assist-input"]/div/input")[0].send_keys("goog")
x = driver.find_elements_by_xpath("//div[@data-reactid="56"]/ul[@data-reactid="57"]/")