Reputation: 61
I have created this Keyword:
Validate Header
Wait Until Page Contains id=outputtext-text-Header:ApplicationHeaderCoachView1:ApplicationHeaderCoachViewInner1:Output_Text1
Element Should Be Visible id=outputtext-text-Header:ApplicationHeaderCoachView1:ApplicationHeaderCoachViewInner1:Output_Text1
But it always fail and give me this error:
Text 'id=outputtext-text-Header:ApplicationHeaderCoachView1:ApplicationHeaderCoachViewInner1:Output_Text1' did not appear in 5 seconds.
The Element HTML Code is:
<p id="outputtext-text-Header:ApplicationHeaderCoachView1:ApplicationHeaderCoachViewInner1:Output_Text1" aria-labelledby="outputtext-label-Header:ApplicationHeaderCoachView1:ApplicationHeaderCoachViewInner1:Output_Text1" class="text-left">FCP</p>
Upvotes: 0
Views: 141
Reputation: 386362
You're waiting for the page to contain the literal string "id=outputtext-text..." displayed somewhere on the screen. Are you sure that's what should appear on the page? It looks like a locator, but that keyword takes a string instead of a locator.
I don't know for sure what you're trying to do, but if you're waiting for an element with the given id, you should use Wait until page contains element which takes a locator as an argument.
Upvotes: 2