This is a follow up from the previous question I had. Basically, I'm trying to scrape all CRD# from the search result from this site https://brokercheck.finra.org/search/genericsearch/list
(You'll need to redo the search when you click on the link, just type some random stuff for the Individual search)
I'm trying to scrape the Disclosure to get Yes or No, but this box uses an ng-if to display Yes or No, or for some rows it won't even display it.
I'm using the CSS_SELECTOR to select the text of that div. However, the content of the ng-if is different
# No
print([disclosure.get_attribute("innerHTML") for disclosure in WebDriverWait(driver, 10).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR, "div.ng-scope[ng-if='!vm.item.hasDisclosures() && vm.item.hasDisclosureFlag()'")))])
# Yes
print([disclosure.get_attribute("innerHTML") for disclosure in WebDriverWait(driver, 10).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR, "div.ng-scope[ng-if='vm.item.hasDisclosures()'")))])
How do I programmatically handle this case?
Thanks.

 
     
    