I am doing a POC on Karate UI automation and have run into something. I am trying to read some text from a ChatBot we've placed on our companies web page and the div only has a class attribute. I have tried the following:
<div class="message bot-message bot-animation">Hi, I am the Assistant</div>
And waitForText('.messageCls','Hi, I am the Assistant')
Received the following error because it could not find it.
\feature:15 - javascript evaluation failed: waitForText('.messageCls','Hi, I am the Assistant'), wait failed for: .messageCls and condition: _.textContent.includes('Hi, I am the Assistant') after 21047 milliseconds
I've tried And waitForText('body','Hi, I am the Assistant')
which works but that is not optimal.
What am I missing?
Joe