*** Settings ***
Suite Setup     Select Dynamic Application
Resource        flex_resource.txt

*** Test Cases ***
Wait for existing element
    Wait For Flex Element  createDelayedContentButton

Wait for appearing element
    Click Flex Element  createDelayedContentButton
    Flex Element Should Not Exist  decreaseCountButton
    Wait For Flex Element  decreaseCountButton
    Flex Element Should Exist  decreaseCountButton

Wait for non-existing element
    Run Keyword And Expect Error  Element 'nonExisting' did not appear in 1 second  Wait For Flex Element  nonExisting  1 second

Wait for when no application selected
   Select Flex Application  ${None}
   Run Keyword And Expect Error  ${NO FLEX APP ERROR}  Wait For Flex Element  createDelayedContentButton
