How do I retrieve text from inside the html using wallaby/elixir?

Viewed 237

I need to use the digits displayed in the HTML to make test with elixir/ wallaby.

ex:

class="app-add-installemnts-link">14903 1/3</a></td>

How can I retrieve the number: 14903 1/3

Is there a function or a way to do this?

2 Answers

If there's only one matching element:

find(css(".app-add-installemnts-link")
|> Element.text()

Reference

Related