hello twdoka,
I encountered the same issue, long story short:
The repository item itself is not "smart enough" to change itself to your desired testing language.
Here some solutions I am trying myself at the moment:
1. using repository variable
Edit the xpath of your item like this
Code: Select all
/form/button[@text=$repoLoginLabel]
With this change you are able to assign different variables (e.g. different translations for login) to $repoLoginLabel. you can do this, using an data table, that contains the translations.
You can now create a usercode function to go through your data table, until you found the fitting translation.
(I am currently using this solution mainly, if needed )
2. reflection
Instead of @text attribute you can try to use another, more general variable of your current application code. you might have to change your production code to make this one work.
A very simple example from java:
Code: Select all
// global parameter that will later holds the label text of your button, like login
protected string aLabel;
The usercode class for your module can now find the "wanted" button via .getattributevaluetext("aLabel") function.