0

I using the code below to get the text in span from html. But it only give me this: ['txt1'].

print(WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, "//td[contains(.,'my_lop')]/following-sibling::td[1]"))).text)

-Any expert know how I can get a list with the empty texts as well: ['txt1', ' ', ' ']?

HTML:

<tr style="background-color:#999">
    <td><b style="white-space: nowrap;">my_lop</b></td>
        <td style="text-align:center;">
            <span style="flex: 1;display: flex;flex-direction: column;">
                <span>txt1</span>
                <span> </span>
                <span> </span>
                </span>
        </td>
</tr>
acube
  • 23
  • 5

0 Answers0