Code: Select all
repo.DocumotiveMobile.CogWheel.Click ("20;8");
Second time through - it fails. Unsurprisingly as after the click, the button SHOULD no longer be there.
What is going on here?
Code: Select all
repo.DocumotiveMobile.CogWheel.Click ("20;8");
Code: Select all
repo.DocumotiveMobile.CogWheelInfo.waitForExists(5000);
repo.DocumotiveMobile.CogWheel.Self.Focus();
repo.DocumotiveMobile.CogWheel.Click ("20;8");
Code: Select all
repo.DocumotiveMobile .LoginPage.AdvancedLoginPage.BackButtonInfo .WaitForExists(5000);
repo.DocumotiveMobile .LoginPage.AdvancedLoginPage.BackButton .Focus();
repo.DocumotiveMobile.LoginPage.AdvancedLoginPage.BackButton.Click ("24;24");
Code: Select all
public void GoToAdvancedLoginPage()
{
// we might be on the wrong page
// if no button exists, check if is already on StandardLogin Page.
Report.Log(ReportLevel.Info, "Validation", "Looking for AdvancedLoginButton.", repo.DocumotiveMobile.LoginPage.StandardLogInPage.AdvancedLogInButtonInfo);
if(repo.DocumotiveMobile.LoginPage.StandardLogInPage.AdvancedLogInButtonInfo.Exists(10000))
{
Report.Log(ReportLevel.Info, "Validation", "AdvancedLoginButton exists.", repo.DocumotiveMobile.LoginPage.StandardLogInPage.AdvancedLogInButtonInfo);
Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'DocumotiveMobile.AdvancedLogInButton' at 20;8.", repo.DocumotiveMobile.LoginPage.StandardLogInPage.AdvancedLogInButtonInfo);
repo.DocumotiveMobile.LoginPage.StandardLogInPage.AdvancedLogInButton.Focus();
repo.DocumotiveMobile.LoginPage.StandardLogInPage.AdvancedLogInButton.Click ("20;8");
Report.Log(ReportLevel.Info, "Validation", "AdvancedLoginButton clicked.", repo.DocumotiveMobile.LoginPage.StandardLogInPage.AdvancedLogInButtonInfo);
}
else
{
CheckIfStandardLoginPageAlreadyLoaded();
}
}
public void CheckIfStandardLoginPageAlreadyLoaded()
{
Report.Log(ReportLevel.Info, "Validation", "Validating AttributeEqual (Text='Back') on item 'DocumotiveMobile.BackButton'.", repo.DocumotiveMobile.LoginPage.AdvancedLoginPage .BackButtonInfo);
Validate.Attribute(repo.DocumotiveMobile.LoginPage.AdvancedLoginPage .BackButtonInfo, "Text", "Back");
}