Code: Select all
public void Login()
{
bool bExists;
bExists = repo.pgLogin.SelfInfo.Exists();
if(bExists)
{
repo.pgLogin.txtUsername.Value = this.sUsername;
repo.pgLogin.txtPassword.Value = this.sPassword;
repo.pgLogin.btnLogin.Click();
}
else
{
Validate.Exists(repo.pgLogin.SelfInfo);
}
}
The call to "repo.pgLogin.SelfInfo.Exists();" is returning false which causes the code to go into the "else" statement. But in there, the "Validate.Exists(repo.pgLogin.SelfInfo);" is passing and says the "Element for item 'Self' does exist." in the log. I am completely stumped as to why this is happening.
Couple notes:
- When in the repository, the Highlight Element option finds the page with no issues.
- If I change the first .Exists() call to a Validate.Exists(), it fails
Any ideas?