Xpath variables

Which is the best practices to create variables for xpaths?

Example:
1.$(username_input) //input[@name=‘username’]
2.$(UsernameInput) //input[@name=‘username’]
3.$(USERNAME_INPUT) //input[@name=‘username’]
4.$(Username_Input) //input[@name=‘username’]

Thanks

${USERNAME_INPUT}    //input[@name=‘username’]

A common practice (and also recommended in the Robot Framework Style Guide) is to use ALL CAPS for constants.

2 Likes

Thank you Helio