Task AddContact(string firstName, string lastName, string phoneNumber, bool shouldUseReturnKey) { ContactsListPage.TapAddContactButton(); ContactDetailsPage.WaitForPageToLoad(); ContactDetailsPage.PopulateAllTextFields(firstName, lastName, phoneNumber, shouldUseReturnKey); ContactDetailsPage.TapSaveButton(); ContactsListPage.WaitForPageToLoad(); return(ContactsListPage.WaitForNoPullToRefreshActivityIndicatorAsync()); }
public async Task EnterContactInformationThenPressCancel(string firstName, string lastName, string phoneNumber) { //Arrange //Act ContactsListPage.TapAddContactButton(); ContactDetailsPage.WaitForPageToLoad(); ContactDetailsPage.PopulateAllTextFields(firstName, lastName, phoneNumber, false); ContactDetailsPage.TapCancelButton(); ContactsListPage.WaitForPageToLoad(); await ContactsListPage.WaitForNoPullToRefreshActivityIndicator().ConfigureAwait(false); //Assert Assert.IsFalse(ContactsListPage.DoesContactExist(firstName, lastName, phoneNumber)); }
async Task AddContact(string firstName, string lastName, string phoneNumber, bool shouldUseReturnKey) { ContactsListPage.TapAddContactButton(); ContactDetailsPage.WaitForPageToLoad(); ContactDetailsPage.PopulateAllTextFields(firstName, lastName, phoneNumber, shouldUseReturnKey); ContactDetailsPage.TapSaveButton(); ContactsListPage.WaitForPageToLoad(); try { await ContactsListPage.WaitForPullToRefreshActivityIndicator(3).ConfigureAwait(false); } catch { } await ContactsListPage.WaitForNoPullToRefreshActivityIndicator().ConfigureAwait(false); }