Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create clear_all_chats() in Tithiwa class to clear all chats #25

Closed
NavpreetDevpuri opened this issue Oct 12, 2020 · 4 comments · Fixed by #83
Closed

Create clear_all_chats() in Tithiwa class to clear all chats #25

NavpreetDevpuri opened this issue Oct 12, 2020 · 4 comments · Fixed by #83
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed python

Comments

@NavpreetDevpuri
Copy link
Member

similar to #23 and #24

@NavpreetDevpuri NavpreetDevpuri added enhancement New feature or request help wanted Extra attention is needed hacktoberfest python labels Oct 12, 2020
@NavpreetDevpuri
Copy link
Member Author

tithiwa/tithiwa/group.py

Lines 113 to 130 in 7cef0e1

def exit_from_all_groups(self):
self._wait_for_an_presence_of_element(SELECTORS.GROUPS.GROUP_NAME_IN_CHATS)
self._wait_for_an_element_to_be_clickable(SELECTORS.MAIN_SEARCH_BAR).click()
preactive = None
self.browser.switch_to.active_element.send_keys(Keys.ARROW_DOWN)
curractive = self.browser.switch_to.active_element
while curractive != preactive:
groupnameelement = None
try:
groupnameelement = curractive.find_element(By.CSS_SELECTOR, SELECTORS.GROUPS.GROUP_NAME_IN_CHATS)
except:
pass
if groupnameelement != None:
groupname = groupnameelement.get_attribute('innerText')
self._wait_for_group_to_open_then_exit(groupname)
preactive = curractive
curractive.send_keys(Keys.ARROW_DOWN)
curractive = self.browser.switch_to.active_element

That's how we can go through all chats

@NavpreetDevpuri NavpreetDevpuri added the good first issue Good for newcomers label Oct 21, 2020
@NavpreetDevpuri
Copy link
Member Author

ShareX_bge3iVVLh8

@NavpreetDevpuri
Copy link
Member Author

  1. go through all group chats same as in exit_from_all_groups()
  2. open group options using CHATROOM__OPTIONS
  3. press on Clear chat and wait for the chat to be cleared by using self._close_info()

@ghostrider22
Copy link
Contributor

Sir, I would like to do this task. Please assign this issue to me.

@NavpreetDevpuri NavpreetDevpuri linked a pull request Oct 26, 2021 that will close this issue
Automate essentials automation moved this from To do to Done Oct 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed python
Projects
Development

Successfully merging a pull request may close this issue.

2 participants