Hello Roboteers,
I am looking for a solution for using scalars in Windows application automation (I guess that web automation might have similar requirement). I and using FlaUI library, and all the identifiers are declared in the Variables section or in resource file.
The way the identifiers are defined is top-down, according to the graphic elements hierarchy, a simple example, for the application’s login window:
*** Variables ***
${WINDOW_TITLE} Main Window version -
${LOGIN_WINDOW_NAME} /Window[@Name=‘${WINDOW_TITLE}’]
${LOGIN_USER_TEXT_FIELD} ${LOGIN_WINDOW_NAME}/Edit[@AutomationId=‘Username’]
${LOGIN_PASSWD_TEXT_FIELD} ${LOGIN_WINDOW_NAME}/Edit[@AutomationId=‘Password’]
${LOGIN_BUTTON} ${LOGIN_WINDOW}/Button[@Name=‘Login’]
So each scalar contains previously declared scalar, mostly the parent graphic element. Since we started to release new versions of the application, the Window’s title is now contains a version text. I wish that the same automation will test all the versions, so I am looking for a solution to modify all variables content.
Obviously, changing the top variable during the test has no affect on the rest of the variables, in the above example the value of ${LOGIN_USER_TEXT_FIELD} is /Window[@Name=‘Main Window version -’]/Edit[@AutomationId=‘Username’]
And modify ${WINDOW_TITLE} to Main Window version - V2 has no affect on ${LOGIN_USER_TEXT_FIELD}.
We have a lot of tests for this application and before going for this major change adventure I wish to receive some advice. RF 5.1 Python 3.8.2
Thanks !