public void ClickOnContactsLink() { if (ContactsLink.Displayed) { ContactsLink.Click(); } else { throw new Exception("Element is not found or not clickable"); } }
/// <summary> /// Deletes a contact from the list. /// </summary> /// <param name="contact"></param> /// <returns></returns> public async Task <bool> DeleteContactAsync(Models.Contact contact) { await ConnectAsync(); bool deleteSuccessfully = false; try { ContactsLink contactsLink = await _client.DeleteContact(new InputUserContactConstructor(contact.Id)); deleteSuccessfully = true; } catch (TelegramReqestException ex) { _logger.Error($"The contact with id `{contact.Id}` can not be found in contacts", ex); } return(deleteSuccessfully); }
public override void OnResponse(BinaryReader reader) { contactsLink = TLObject.Read <ContactsLink>(reader); }