Reputation: 25
On this page https://www.storytel.com/se/sv/ljudbocker
i want to locate any book cover or title because I want to click on it. However I keep getting the error that it does not match any element in the DOM tree. It does have many markups so maybe that could be the reason. Does anyone know how i can make this work? Thank you
Upvotes: 1
Views: 37
Reputation: 567
To click on book with title 'Rött, vitt och kungligt blått', first try saving the div section which contains the book using
const smartList1 = Selector('#smartList1');
Now to click on the specific title 'Rött, vitt och kungligt blått', try
await t.click(smartList1.find('a.sliderBookTitleLink').withText('Rött, vitt och kungligt blått'));
Upvotes: 2