Skip to content

Commit

Permalink
Merge pull request #1623 from totvs/hotfix/poui_key
Browse files Browse the repository at this point in the history
fix poui reload
  • Loading branch information
98llm authored Dec 30, 2024
2 parents 20d4370 + d08b9fe commit 976cda9
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions tir/technologies/webapp_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ def Setup(self, initial_program, date='', group='99', branch='01', module='', sa
logger().info(f"***System Info*** in Setup():")
system_info()

self.config.poui_login = self.config.json_data['POUILogin']
if 'POUILogin' in self.config.json_data and self.config.json_data['POUILogin'] == True:
self.config.poui_login = True
else:
self.config.poui_login = False

try:
self.service_process_bat_file()
Expand Down Expand Up @@ -8179,7 +8182,12 @@ def AddParameter(self, parameter, branch, portuguese_value, english_value="", sp
"""

logger().info(f"AddParameter: {parameter}")
twebview = True if self.config.json_data['POUILogin'] else False

if 'POUILogin' in self.config.json_data and self.config.json_data['POUILogin'] == True:
twebview = True
else:
twebview = False

endtime = time.time() + self.config.time_out
halftime = ((endtime - time.time()) / 2)

Expand Down Expand Up @@ -8261,7 +8269,12 @@ def parameter_url(self, restore_backup=False):
>>> self.parameter_url(restore_backup=False)
"""
try_counter = False
twebview = True if self.config.json_data['POUILogin'] else False

if 'POUILogin' in self.config.json_data and self.config.json_data['POUILogin'] == True:
twebview = True
else:
twebview = False

endtime = time.time() + self.config.time_out
halftime = ((endtime - time.time()) / 2)
function_to_call = "u_SetParam" if restore_backup is False else "u_RestorePar"
Expand Down Expand Up @@ -9463,7 +9476,10 @@ def TearDown(self):
logger().exception(str(e))
webdriver_exception = e

self.config.poui_login = self.config.json_data['POUILogin']
if 'POUILogin' in self.config.json_data and self.config.json_data['POUILogin'] == True:
self.config.poui_login = True
else:
self.config.poui_login = False

if webdriver_exception:
message = f"Wasn't possible execute self.driver.refresh() Exception: {next(iter(webdriver_exception.msg.split(':')), None)}"
Expand Down

0 comments on commit 976cda9

Please sign in to comment.