'Selenium Not Able to Find Elements By ClassName

<table class="sc-fAEnHe ePMtc">
<tbody>
<tr class="sc-fAEnHe ePMtc">
<td classs"sc-jEECVv IBUtl">
</td>
</tr>

When I use Selenium's Find element by class it is able to find the element, I even tried replacing space (after e and r or v and I) with ".", "-" and "_" but it did not worked. I Used The Code Below

try:
    match_history_table = WebDriverWait(driver, 30).until(
        EC.presence_of_element_located((By.CLASS_NAME, 'sc-fAEnHe ePMtc'))
    )
except Exception:
    print("Error Finding Match History Table")
    driver.quit()

It always returned the Exception (EC is selenium.webdriver.support.expected_conditions) >Note: Find Elements By Tag is not an Option For me



Solution 1:[1]

  1. when you search for class name value, notice that "sc-fAEnHe ePMtc" represent 2 class names separated by space, so you can search by "sc-fAEnHe" or by "ePMtc"
  2. besides that make sure that presence_of_element_located doesn't require an element with height and width that greater then 0

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Itay Levy