I want to automate a test on a password field with a button that shows the clear text of the password when it is clicked. (It is not a toggle: the user has to maintain the mouse button down)
I have been able to automate everything I need but I haven't managed to do the "press on the button" action while executing the verification of the clear text.
It seems everything in Ranorex must be sequential :/
I tried to do it with user code, but I couldn't find a click duration parameter (the only duration is for the mouse move before the click).
Here is a snippet of my attempt with user code (it does not work because of the missing click duration I mentioned above):
Code: Select all
public void MergedUserCodeMethod(RepoItemInfo clickToShowTextInfo, RepoItemInfo passwordBoxClearText)
{
var asyncValidation = Task.Run(async () =>
{
await Task.Delay(1000);
Validate.AttributeEqual(passwordBoxClearText, "Text", "coucou");
});
clickToShowTextInfo.FindAdapter<Text>().Click(Duration.FromMilliseconds(3000));
}
Thanks.