How to embed arguments into Robot Framework keyword name

Paweł Wojtal

I've tried to make some keywords in Robot Framework which has arguments embedded in the keyword name, according to (Robot Docs), but unfortunately I'm always getting None when I'm checking what is under the variable. Did you meet such behaviour? What have I done wrong??

My keyword example:

Set ${object} state to ${state}
    Log To Console  ${object}
    Log To Console  ${state}

Let's assume that ${object} and ${state} are strings, so the call of this keyword looks like this:

${status}=  Run Keyword And Return Status  Set camera state to locked
Bryan Oakley

Your code is fine. Here is a complete working example:

*** Keywords ***
Set ${object} state to ${state}
    Log To Console    ${object}
    Log To Console    ${state}

*** Test Cases ***
Example test case
    ${status}=        Run Keyword And Return Status    Set camera state to locked
    Should be True    ${status}

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

After applying for loop in robot framework , Error came as follows- Keyword name cannot be empty

分類Dev

Robot Framework Run Keyword If .. ELSE fails

分類Dev

Python module does not work as expected, if used as custom keyword in Robot Framework

分類Dev

How to embed framework which depends on architecture

分類Dev

How to uppercase and convert data to ArrayList in Robot framework?

分類Dev

how to read csv values using robot framework

分類Dev

How to run sikuli script inside robot framework?

分類Dev

How to do some infinite task with Robot Framework?

分類Dev

How to combine variable length arguments with keyword arguments in python?

分類Dev

How to use 'In' SQL keyword in Entity Framework?

分類Dev

How to resolve this error "No keyword with name 'and' found"

分類Dev

How to make a singleton object with an arbitrary number of keyword arguments in Python?

分類Dev

How to Tag Data Driven Template Tests in Robot Framework

分類Dev

How to get API response using Restinstance with Robot Framework?

分類Dev

How to fetch the first key from list using robot framework code?

分類Dev

how to use "keep in dictionary" in a function using robot framework

分類Dev

Robot Framework - How to import SeleniumLibrary keywords implementation/documentation in eclipse

分類Dev

How to verify words one by one on a locator in Robot Framework?

分類Dev

Run Keyword If で複数のステートメントを処理する - Robot Framework

分類Dev

Positional arguments and the self keyword

分類Dev

Robot Framework Download File

分類Dev

Robot Framework : Configuration Profiles

分類Dev

Abstract Keywords in Robot Framework

分類Dev

Robot Framework Regexp

分類Dev

Loop in loop robot framework

分類Dev

best way to distribute keyword arguments?

分類Dev

Manual input (Captcha) with Robot Framework?

分類Dev

Selenium Robot Framework Web Locator

分類Dev

Saving class objects in robot framework

Related 関連記事

  1. 1

    After applying for loop in robot framework , Error came as follows- Keyword name cannot be empty

  2. 2

    Robot Framework Run Keyword If .. ELSE fails

  3. 3

    Python module does not work as expected, if used as custom keyword in Robot Framework

  4. 4

    How to embed framework which depends on architecture

  5. 5

    How to uppercase and convert data to ArrayList in Robot framework?

  6. 6

    how to read csv values using robot framework

  7. 7

    How to run sikuli script inside robot framework?

  8. 8

    How to do some infinite task with Robot Framework?

  9. 9

    How to combine variable length arguments with keyword arguments in python?

  10. 10

    How to use 'In' SQL keyword in Entity Framework?

  11. 11

    How to resolve this error "No keyword with name 'and' found"

  12. 12

    How to make a singleton object with an arbitrary number of keyword arguments in Python?

  13. 13

    How to Tag Data Driven Template Tests in Robot Framework

  14. 14

    How to get API response using Restinstance with Robot Framework?

  15. 15

    How to fetch the first key from list using robot framework code?

  16. 16

    how to use "keep in dictionary" in a function using robot framework

  17. 17

    Robot Framework - How to import SeleniumLibrary keywords implementation/documentation in eclipse

  18. 18

    How to verify words one by one on a locator in Robot Framework?

  19. 19

    Run Keyword If で複数のステートメントを処理する - Robot Framework

  20. 20

    Positional arguments and the self keyword

  21. 21

    Robot Framework Download File

  22. 22

    Robot Framework : Configuration Profiles

  23. 23

    Abstract Keywords in Robot Framework

  24. 24

    Robot Framework Regexp

  25. 25

    Loop in loop robot framework

  26. 26

    best way to distribute keyword arguments?

  27. 27

    Manual input (Captcha) with Robot Framework?

  28. 28

    Selenium Robot Framework Web Locator

  29. 29

    Saving class objects in robot framework

ホットタグ

アーカイブ