Variables that are defined in a class aren't recognized or autofilled when writing test cases in robot. I created multiple files with various classes to organize my locator variables but they are all unrecognized in robot files. Everything runs fine and tests pass, its just much harder to write and figure if a variable actually does not exist.
Test.robot:
Testing
[Documentation] Testing Stuff
Open Test Application
Tap Element ${WelcomeScreen.iAgree_button}
Tap Element ${LetsGetStartedScreen.setupNow_button}
Locators.py:
class WelcomeScreen:
EULAPrivacy_link = "//android.view.ViewGroup/android.widget.TextView[2]"
iAgree_button = "IAgreeButton"
debugSettings_button = "//android.view.ViewGroup/android.view.ViewGroup/android.widget.ImageButton"
class LetsGetStartedScreen:
setupNow_button = "SetupButton"
tutorial_button = "TutorialButton"
In this case ${WelcomeScreen.iAgree_button} and ${LetsGetStartedScreen.setupNow_button} won't autofill and display an unknown variable in the editor.
Variables that are defined in a class aren't recognized or autofilled when writing test cases in robot. I created multiple files with various classes to organize my locator variables but they are all unrecognized in robot files. Everything runs fine and tests pass, its just much harder to write and figure if a variable actually does not exist.
In this case
${WelcomeScreen.iAgree_button}and${LetsGetStartedScreen.setupNow_button}won't autofill and display an unknown variable in the editor.