0

I just started using Robot Framework and I wrote simple tests that should pass but they don't. The screenshot clearly shows that the elements are on the website. These are a couple of examples:

Page Should Contain Element    name    websiteRegistration

or

Page Should Contain    Sign in and start watching

to look for the text.

The entire resource.txt is described below:

*** Settings ***
Documentation     A resource file with reusable keywords and variables.
...
...               The system specific keywords created here form our own
...               domain specific language. They utilize keywords provided
...               by the imported Selenium2Library.
Library           Selenium2Library

*** Variables ***
${SERVER}    localhost:8080
${BROWSER}    Firefox
${DELAY}    20
${HOME URL}    http://${SERVER}/some-link-that-works

*** Keywords ***
Open Browser To Welcome Page
    Open Browser    ${HOME URL}    ${BROWSER}

Check If It Works
    Set Selenium Speed    ${DELAY}
    Page Should Contain    Sign in and start watching

Thank you for your help!!

1 Answer 1

1

Without additional information, I would guess, that your test code is arriving to the page just a little bit too early. Try the following:

Check If It Works
    Set Selenium Speed    ${DELAY}
    Wait Until Page Contains    Sign in and start watching 
    Page Should Contain    Sign in and start watching

Check this list for more info.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.