I am new to programming. Please help me with this. I want to use validate.exists function as my condition in the code like below. if it returns true I want to exit the module and if it returns false other modules should be executed.
public void ITestModule()
{
Report.Log(ReportLevel.Info, "Validation", "Validating Exists on item 'Internet.abc.Connexion.Deconnexion'.", repo.Internet.abc.Connexion.DeconnexionInfo, new RecordItemIndex(0));
if (Validate.Exists(repo.Internet.abc.Connexion.DeconnexionInfo))
{
Report.Success("Connected");
return;
}
else
{
Delay.Milliseconds(0);
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Internet.abc.Connexion.Httpsxyz' at Center.", repo.Internet.abc.Connexion.Httpsxyz, new RecordItemIndex(1));
repo.Internet.abc.Connexion.Httpsxyz.Click();
Delay.Milliseconds(200);
}
}
Aucun commentaire:
Enregistrer un commentaire