0

I would like to know how to do something like this:

Resource File:

*** Settings ***
Library SeleniumLibrary

*** Keywords ***

Open Outdoor Menu
   Click Element  id:outdoor_menu

Check Outdoor Monitor Specs
    Page Should Contain Element  id:outdoorpossible

Check Monitors Specs
    [Arguments]   ${Menu}
    Open ${Menu} Menu
    Check ${Menu} Monitor Specs

I have different ${Menu} monitors and something like this would be really helpful. So my test would be like this:

...
Test Template   Check Monitors Specs

*** Test Cases ***
Outdoor Menu  Outdoor
Station Menu  Station
etc.

I try this and gives me this error : " no keyword with name 'Open ${Menu} Menu' found. " Do you have any ideas on how can i implement something like this? Many thanks

3

1 Answer 1

1

You need to use "Run Keyword"

Check Monitors Specs
   [Arguments]   ${Menu}
   Run Keyword  Open ${Menu} Menu   
   Run Keyword  Check ${Menu} Monitor Specs
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.