i try to webscrape this part of a html:
<td class="zebraTable__td zebraTable__td--companyName"><a href="/unternehmen/8116602/schneider-electric-holding-germany-gmbh" data-gtm="companySearch__searchResult--76">
Schneider Electric Holding Germany GmbH
</a></td>
from this Site:
with this Code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
import pandas as pd
import time
driver = webdriver.Chrome('/Users/rieder/Anaconda3/chromedriver_win32/chromedriver.exe')
driver.get('https://de.statista.com/companydb/suche?idCountry=276&idBranch=0&revenueFrom=-1000000000000000000&revenueTo=1000000000000000000&employeesFrom=500&employeesTo=100000000&sortMethod=revenueDesc&p=1')
driver.find_element_by_id("cookiesNotificationConfirm").click();
company_name = driver.find_element_by_class_name('zebraTable__td zebraTable__td--companyName')
print(company_name)
I tried it for 4 hours and cant get it. I tried it with different methods like xpath, link text etc. but all i got is a empty company Name like this "[ ]".
Does someone know how selenium can find this exact piece of text "Liebherr-Hausgeräte Ochsenhausen GmbH"?
Thanks a lot.