Help with multiple Selenium Python Ivs

Asked

Viewed 66 times

-1

Friends, can you help me? I want to make web Scrap from a page and return all 8 texts from a span.text-Ellipsis. I made the following code:

    self.otherPlayers = self.driver.find_element_by_css_selector('span.text-ellipsis').text

but as I turn into string, I can only return one value. how to return the other?

1 answer

3

Using elements instead of element:

self.otherPlayers = self.driver.find_elements_by_css_selector('span.text-ellipsis').text

Browser other questions tagged

You are not signed in. Login or sign up in order to post.