Skip to content

Commit

Permalink
57 let select_chat only return when chat has been opened
Browse files Browse the repository at this point in the history
  • Loading branch information
btimbermont committed Jan 6, 2025
1 parent dfb18ef commit 9342d26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions puma/apps/android/telegram/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def select_chat(self, chat: str):
self.return_to_homescreen()
xpath = f'//android.view.ViewGroup[starts-with(lower-case(@content-desc), "{chat.lower()}")]'
self.driver.find_element(by=AppiumBy.XPATH, value=xpath).click()
if not self._currently_in_conversation(implicit_wait=1):
raise RuntimeError("Conversation was not opened after clicking the conversation")

def select_group(self, group_name: str):
"""
Expand Down

0 comments on commit 9342d26

Please sign in to comment.