Skip to content

Instantly share code, notes, and snippets.

@frostming
Created June 3, 2016 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frostming/2f66506c03d782837922cea61741f7be to your computer and use it in GitHub Desktop.
Save frostming/2f66506c03d782837922cea61741f7be to your computer and use it in GitHub Desktop.
# Under UIVariables directory
title = "Main Window"
# Remove this line will cause a failure "Cannot find variable"
from UIVariables import MainFrame
class MyLibrary:
def some_keyword(param):
print param
*** Settings ***
Library MyLibrary
Variables UIVariables
*** Test Cases ***
Simple Test
Some Keyword ${MainFrame.title}
@frostming
Copy link
Author

Files tree:

|- MyLibrary.py
|- UIVariables
   |- __init__.py
   |- MainFrame.py

@frostming
Copy link
Author

If remove the import line in MyLibrary.py, the test case will run fail with "Resolving variable '${MainFrame.title} failed: Non-existing variable '${MainFrame}'."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment