title: RobotFramework, how to check text on page
body: <p>if there appears text on a page after hitting a button.</p>
  
  <p>the only thing it is in  is a class, like so:</p>
  
  <pre><code>&lt;label class="err"&gt;2 van de 3 velden  Eiwit, Koolhydraten, Vet  zijn leeg.&lt;/label&gt;
  </code></pre>
  
  <p>with what should you verify?</p>
  
  <p>I tried:</p>
  
  <pre><code>Page Should Contain Textfield    err
  </code></pre>
  
  <p>but that's not the way to go I think</p>
  
  <pre><code>    *** Keywords ***
  Open Browser To Login Page
      Open Browser    ${LOGIN URL}    ${BROWSER}
      Maximize Browser Window
      Set Browser Implicit Wait    5
      Set Selenium Speed    ${DELAY}
      Login Page Should Be Open
  
  Login Page Should Be Open
      Title Should Be    Hippe testautomatisering getest i.c.m. testtechnieken
  
  Go To Login Page
      Go To    ${LOGIN URL}
      Login Page Should Be Open
  
  Input Username
      [Arguments]    ${username} 
      Input Text    voedselnaam    ${username}
  
  Input Password
      [Arguments]    ${password}
      Input Text    Eenheid    ${password}
      Input Text    Kcal    ${password}
      Input Text    Eiwit    ${password}
  
  Submit Credentials
      Click Element   getdata    
      page should contain  //label[@class='err']  2 van de 3 velden Eiwit, Koolhydraten, Vet zijn leeg.
  
  
  Welcome Page Should Be Open
      Location Should Be    ${LOGIN URL}
      Title Should Be    Welcome Page
  </code></pre>