public void Should_SuccessLogin_ForValidAccount() { if (AppList != null && AppList.Any()) { foreach (var item in AppList) { SuccessLoginForValidCredentials(item); } } }
public void Should_ShowAlert_ForEmptyAccount() { if (AppList != null && AppList.Any()) { foreach (var app in AppList) { TapButton(app, _loginButton); app.WaitForElement(e => e.Text(Strings.EnterEmailMessage)); Assert.AreEqual(Strings.EnterEmailMessage, app.Query(Strings.EnterEmailMessage).First().Text); app.Tap(e => e.Text(Strings.Ok)); } } }
public void Should_ShowAlert_ForInValidAccount() { if (AppList != null && AppList.Any()) { foreach (var app in AppList) { EnterText(app, _emailEntry, InValidUserEmail); EnterText(app, _passwordEntry, InValidUserPassword); TapButton(app, _loginButton); app.WaitForElement(e => e.Text(Strings.IncorrectLoginDataMessage)); Assert.AreEqual(Strings.IncorrectLoginDataMessage, app.Query(Strings.IncorrectLoginDataMessage).First().Text); app.Tap(e => e.Text(Strings.Ok)); } } }
public void Should_SuccessLogout_ForValidAccount() { if (AppList != null && AppList.Any()) { foreach (var app in AppList) { SuccessLoginForValidCredentials(app); TapButton(app, _profileTabButton); TapButton(app, _logoutButton); var loginButtonEnabled = app.Query(_loginButton).FirstOrDefault().Enabled; Assert.AreEqual(true, loginButtonEnabled); } } }
/// <summary> /// 获取应用更新列表 /// </summary> /// <param name="applicationName">应用名称</param> /// <returns></returns> public ApplicationEntity GetServerPublishFiles(string applicationName) { if (AppList != null && AppList.Any() && AppList.Any(o => o.AppName == applicationName)) { return(AppList.FirstOrDefault(o => o.AppName == applicationName)); } if (File.Exists(appInfoXMLPath + applicationName + ".txt")) { var getTxtString = File.ReadAllText(appInfoXMLPath + applicationName + ".txt", Encoding.Default); var appEntity = FileProcessingHelper.GetTFromXML <ApplicationEntity>(getTxtString); if (appEntity != null) { AppList = new List <ApplicationEntity>(); AppList.Add(appEntity); return(appEntity); } return(new ApplicationEntity()); } return(new ApplicationEntity()); }
/// <summary> /// 获取应用程序名称 /// </summary> /// <param name="applicationName"></param> /// <returns></returns> public string GetVersionByApplicationName(string applicationName) { if (AppList == null || !AppList.Any()) { var appXMLPath = appInfoXMLPath + applicationName + ".txt"; if (File.Exists(appXMLPath)) { var getTxtString = File.ReadAllText(appXMLPath, Encoding.Default); var appEntity = FileProcessingHelper.GetTFromXML <ApplicationEntity>(getTxtString); if (appEntity != null) { AppList = new List <ApplicationEntity>(); AppList.Add(appEntity); return(appEntity.AppVersion); } } return(string.Empty); } if (AppList.Exists(o => o.AppName == applicationName) && !string.IsNullOrEmpty(AppList.FirstOrDefault(o => o.AppName == applicationName).AppVersion)) { return(AppList.FirstOrDefault(o => o.AppName == applicationName).AppVersion); } return(string.Empty); }