In my Repository, i have a button with a variable "actionName", that will be called with Add,Save, Cancel, Edit,Delete, etc ...
Code: Select all
.//button/text[@Name=$btnactioname]
What i did so far, i created a code module :
Code: Select all
public class ClickActionBar : ITestModule
{
public static CommonGUIRepository repo = CommonGUIRepository.Instance;
/// <summary>
/// Constructs a new instance.
/// </summary>
public ClickActionBar()
{
// Do not delete - a parameterless constructor is required!
}
/// <summary>
/// Performs the playback of actions in this module.
/// </summary>
/// <remarks>You should not call this method directly, instead pass the module
/// instance to the <see cref="TestModuleRunner.Run(ITestModule)"/> method
/// that will in turn invoke this method.</remarks>
void ITestModule.Run()
{
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;
}
public void ClickActionName(string name)
{
repo.btnactionname = name;
repo.Portal.FormControl.ActionBar.btnAction.Click();
}
}
I think what i want to do is quite commun, but i can't find an easy way.
Thanks in advance