Skip to content

Commit

Permalink
Merge pull request #1633 from totvs/hotfix/chrome
Browse files Browse the repository at this point in the history
fix chrome input to 2.0
  • Loading branch information
renanllisboa authored Jan 3, 2025
2 parents 707b3e5 + c30fad6 commit f14bdb4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tir/technologies/webapp_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ def filling_date(self, shadow_root=None, container=None):
self.config.date = datetime.today().strftime(f'%d{d}%m{d}%Y')

click_type = 1
send_type = 1
base_date_value = ''
endtime = time.time() + self.config.time_out / 2
while (time.time() < endtime and (base_date_value.strip() != self.config.date.strip())):
Expand Down Expand Up @@ -865,19 +866,21 @@ def filling_date(self, shadow_root=None, container=None):
ActionChains(self.driver).key_down(Keys.CONTROL).key_down(Keys.SHIFT).send_keys(
Keys.END).key_up(Keys.CONTROL).key_up(Keys.SHIFT).perform()

if self.config.browser.lower() == "chrome":
self.try_send_keys(date, self.config.date)
else:
self.send_keys(date(), self.config.date)

self.try_send_keys(date, self.config.date, try_counter=send_type)


base_date_value = self.merge_date_mask(self.config.date, self.get_web_value(date()))
if self.config.poui_login:
ActionChains(self.driver).send_keys(Keys.TAB * 2).perform()

time.sleep(1)
click_type += 1
send_type += 1
if click_type > 3:
click_type = 1
if send_type > 3:
send_type = 1

def filling_group(self, shadow_root=None, container=None):
"""
Expand Down

0 comments on commit f14bdb4

Please sign in to comment.