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>

I'm trying to verify that element is present on the page. I don't care about the text that this element display, I only need to verify its filled on the page. But always have this error that element did not appear in 5 seconds. I already try Element Should Be Visible, Page Should Contain Element, Page Should Contain TextField and other keywords.


The Wait Until Page Contains keyword waits for a text, that should appear on the page. From documentation:

Waits until text appears on current page.

Fails if timeout expires before the text appears.

You have passed a locator for an element as the expected text and that won't be visible on the page. If you check the error message, it states "Text 'id=..." did not appear.

What you need is the Wait Until Page Contains Element which will wait until an element appears on the page.

Waits until element locator appears on current page.

Fails if timeout expires before the element appears.

  • @Carlos Peixoto Did you manage to get it work? – Bence Kaulics Feb 9 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.