Skip to content

Commit

Permalink
Merge pull request #1653 from totvs/release/v2.0.0rc31
Browse files Browse the repository at this point in the history
Release/v2.0.0rc31
  • Loading branch information
renanllisboa authored Jan 28, 2025
2 parents 1ab1fca + 0184188 commit c413cd1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion scripts/install_package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ taskkill /f /im chromedriver.exe
echo -------------------------
echo Installing project...
echo -------------------------
pip install -U dist/tir_framework-2.0.0rc30.tar.gz
pip install -U dist/tir_framework-2.0.0rc31.tar.gz
pause >nul | set/p = Press any key to exit ...
37 changes: 22 additions & 15 deletions tir/technologies/webapp_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,7 @@ def filling_date(self, shadow_root=None, container=None):
click_type = 1
send_type = 1
base_date_value = ''
is_active_element = None
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 @@ -861,26 +862,32 @@ def filling_date(self, shadow_root=None, container=None):
logger().info(f'Filling Date: "{self.config.date}"')

self.wait_blocker()
self.click(date(), click_type=enum.ClickType(click_type))
ActionChains(self.driver).key_down(Keys.CONTROL).send_keys(Keys.HOME).key_up(Keys.CONTROL).perform()
ActionChains(self.driver).key_down(Keys.CONTROL).key_down(Keys.SHIFT).send_keys(
Keys.END).key_up(Keys.CONTROL).key_up(Keys.SHIFT).perform()
for i in range(3):
self.click(date(), click_type=enum.ClickType(click_type))
ActionChains(self.driver).key_down(Keys.CONTROL).send_keys(Keys.HOME).key_up(Keys.CONTROL).perform()
ActionChains(self.driver).key_down(Keys.CONTROL).key_down(Keys.SHIFT).send_keys(
Keys.END).key_up(Keys.CONTROL).key_up(Keys.SHIFT).perform()

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

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)
send_type += 1
if send_type > 3:
send_type = 1

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()
if base_date_value.strip() == self.config.date.strip():
break

time.sleep(1)
click_type += 1
send_type += 1
if click_type > 3:
click_type = 1
if send_type > 3:
send_type = 1
if not self.is_active_element(date()) and click_type == 3:
self.filling_group(shadow_root, container)

click_type += 1
if click_type > 3:
click_type = 1

def filling_group(self, shadow_root=None, container=None):
"""
Expand Down
2 changes: 1 addition & 1 deletion tir/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.0rc30'
__version__ = '2.0.0rc31'

0 comments on commit c413cd1

Please sign in to comment.