Skip to content

Commit

Permalink
fix button footer
Browse files Browse the repository at this point in the history
  • Loading branch information
98llm committed Jan 28, 2025
1 parent a13b7d0 commit 40303c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tir/technologies/webapp_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4444,10 +4444,10 @@ def SetButton(self, button, sub_item="", position=1, check_error=True):
footer = self.find_shadow_element('footer', self.soup_to_selenium(soup), get_all=False)
if footer:
buttons = self.find_shadow_element("wa-button", footer)
if not buttons:
buttons = footer.find_elements(By.CSS_SELECTOR, "wa-button")
if buttons:
filtered_button = list(filter(lambda x: x.text.strip().replace('\n', '') == button.strip().replace(' \n ', ''), buttons))
else:
buttons = self.driver.execute_script("return arguments[0].querySelectorAll('wa-button')", footer)

if filtered_button and len(filtered_button) - 1 >= position:
parents_actives = list(filter(lambda x: self.filter_active_tabs(x), filtered_button ))
Expand Down

0 comments on commit 40303c9

Please sign in to comment.