Skip to content

Commit

Permalink
Merge pull request #430 from totvs/hotfix/LoadGrid
Browse files Browse the repository at this point in the history
Fix LoadGrid - wait grid if self.grid_input has value only
  • Loading branch information
renanllisboa authored Oct 20, 2020
2 parents bad6d7a + 8c7d206 commit 67ef824
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tir/technologies/webapp_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3394,7 +3394,7 @@ def SetKey(self, key, grid=False, grid_number=1, additional_key="", wait_show =
if key not in hotkey and self.supported_keys(key):
if grid:
if key != "DOWN":
self.LoadGrid( wait_enable = False )
self.LoadGrid()
self.send_action(action=ActionChains(self.driver).key_down(self.supported_keys(key)).perform)
elif tries > 0:
ActionChains(self.driver).key_down(self.supported_keys(key)).perform()
Expand Down Expand Up @@ -3704,7 +3704,7 @@ def check_grid_appender(self, line, column, value, grid_number=0):
"""
self.grid_check.append([line, column, value, grid_number])

def LoadGrid(self, wait_enable = True):
def LoadGrid(self):
"""
This method is responsible for running all actions of the input and check queues
of a grid. After running, the queues would be empty.
Expand All @@ -3721,13 +3721,13 @@ def LoadGrid(self, wait_enable = True):
>>> oHelper.CheckResult("A1_COD", "000001", grid=True, line=1)
>>> oHelper.LoadGrid()
"""
if wait_enable:
self.wait_element(term=".tgetdados, .tgrid, .tcbrowse", scrap_type=enum.ScrapType.CSS_SELECTOR)

x3_dictionaries = self.create_x3_tuple()

initial_layer = 0
if self.grid_input:
self.wait_element(term=".tgetdados, .tgrid, .tcbrowse", scrap_type=enum.ScrapType.CSS_SELECTOR)

if "tget" in self.get_current_container().next.attrs['class']:
self.wait_element(self.grid_input[0][0])
soup = self.get_current_DOM()
Expand Down

0 comments on commit 67ef824

Please sign in to comment.