tir-framework 2.7.0__tar.gz → 2.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tir_framework-2.7.0/tir_framework.egg-info → tir_framework-2.9.0}/PKG-INFO +1 -1
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/main.py +49 -10
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/base.py +2 -2
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/config.py +1 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/language.py +5 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/router.py +17 -4
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/poui_internal.py +241 -107
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/webapp_internal.py +367 -216
- tir_framework-2.9.0/tir/version.py +1 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0/tir_framework.egg-info}/PKG-INFO +1 -1
- tir_framework-2.7.0/tir/version.py +0 -1
- {tir_framework-2.7.0 → tir_framework-2.9.0}/LICENSE +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/MANIFEST.in +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/README.md +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/setup.cfg +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/setup.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tests/test_log.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tests/test_utils.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tests/test_webapp_internal_clicktree.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/__init__.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/apw_internal.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/base_database.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/data/sx3.csv +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/drivers/linux64/geckodriver +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/drivers/windows/chromedriver.exe +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/drivers/windows/electron/chromedriver.exe +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/drivers/windows/geckodriver.exe +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/enumerations.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/events.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/log.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/logging_config.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/numexec.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/psutil_info.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/third_party/screen_size.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/third_party/xpath_soup.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir/technologies/core/utils.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir_framework.egg-info/SOURCES.txt +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir_framework.egg-info/dependency_links.txt +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir_framework.egg-info/requires.txt +0 -0
- {tir_framework-2.7.0 → tir_framework-2.9.0}/tir_framework.egg-info/top_level.txt +0 -0
|
@@ -53,10 +53,12 @@ class Webapp():
|
|
|
53
53
|
subscribe('route.program', self.__router.Program)
|
|
54
54
|
subscribe('route.set_program', self.__router.set_program)
|
|
55
55
|
subscribe('route.set_log_info', self.__router.set_log_info)
|
|
56
|
+
subscribe('route.set_lateral_menu', self.__router.SetLateralMenu)
|
|
56
57
|
|
|
57
58
|
subscribe('webapp.setup', self.__webapp.Setup)
|
|
58
59
|
subscribe('webapp.log_error', self.__webapp.log_error)
|
|
59
60
|
subscribe('webapp.set_button', self.__webapp.SetButton)
|
|
61
|
+
subscribe('webapp.set_button_x', self.__webapp.set_button_x)
|
|
60
62
|
|
|
61
63
|
subscribe('webapp.close_warning_screen_after_routine', self.__webapp.close_warning_screen_after_routine)
|
|
62
64
|
subscribe('webapp.close_coin_screen_after_routine', self.__webapp.close_coin_screen_after_routine)
|
|
@@ -476,7 +478,7 @@ class Webapp():
|
|
|
476
478
|
"""
|
|
477
479
|
self.__webapp.MessageBoxClick(button_text)
|
|
478
480
|
|
|
479
|
-
def Program(self, program_name):
|
|
481
|
+
def Program(self, program_name: str, module: str = ''):
|
|
480
482
|
"""
|
|
481
483
|
Method that sets the program in the initial menu search field.
|
|
482
484
|
|
|
@@ -485,13 +487,16 @@ class Webapp():
|
|
|
485
487
|
|
|
486
488
|
:param program_name: The program name
|
|
487
489
|
:type program_name: str
|
|
490
|
+
:param module: Module abbreviation used to differentiate routines with the same name. - **Default:** "" (empty string)
|
|
491
|
+
:type module: str
|
|
488
492
|
|
|
489
493
|
Usage:
|
|
490
494
|
|
|
491
495
|
>>> # Calling the method:
|
|
492
496
|
>>> oHelper.Program("MATA020")
|
|
497
|
+
>>> oHelper.Program("CRDA200", module="CRD")
|
|
493
498
|
"""
|
|
494
|
-
self.__router.Program(program_name)
|
|
499
|
+
self.__router.Program(program_name=program_name, module=module)
|
|
495
500
|
|
|
496
501
|
def RestoreParameters(self):
|
|
497
502
|
"""
|
|
@@ -615,6 +620,11 @@ class Webapp():
|
|
|
615
620
|
- **Default:** []
|
|
616
621
|
:type filters: list[dict[str, str]]
|
|
617
622
|
|
|
623
|
+
.. note::
|
|
624
|
+
When used with the **New Browse** (kendo-grid), this method automatically removes all
|
|
625
|
+
active filters before performing the search, ensuring the results are not affected by
|
|
626
|
+
previously applied filter conditions.
|
|
627
|
+
|
|
618
628
|
Usage:
|
|
619
629
|
|
|
620
630
|
>>> # To search using the first search box and default search key:
|
|
@@ -788,20 +798,31 @@ class Webapp():
|
|
|
788
798
|
"""
|
|
789
799
|
self.__webapp.SetKey(key, grid, grid_number,additional_key, wait_show, step, wait_change)
|
|
790
800
|
|
|
791
|
-
def SetLateralMenu(self, menuitens, save_input=True, click_menu_functional=False
|
|
801
|
+
def SetLateralMenu(self, menuitens, save_input=True, click_menu_functional=False,
|
|
802
|
+
program_name:str = '', module: str = ''):
|
|
792
803
|
"""
|
|
793
804
|
Navigates through the lateral menu using provided menu path.
|
|
794
805
|
e.g. "MenuItem1 > MenuItem2 > MenuItem3"
|
|
795
806
|
|
|
796
|
-
:param
|
|
797
|
-
:type
|
|
807
|
+
:param menuitens: String with the path to the menu.
|
|
808
|
+
:type menuitens: str
|
|
809
|
+
:param save_input: Keeps compatibility with WebApp lateral menu behavior. - **Default:** True
|
|
810
|
+
:type save_input: bool
|
|
811
|
+
:param click_menu_functional: Uses functional menu click strategy in WebApp. - **Default:** False
|
|
812
|
+
:type click_menu_functional: bool
|
|
813
|
+
:param program_name: Program name to be used in New Home (POUI) when routine descriptions are duplicated. - **Default:** "" (empty string)
|
|
814
|
+
:type program_name: str
|
|
815
|
+
:param module: Module abbreviation used to differentiate routines with the same name in New Home (POUI). - **Default:** "" (empty string)
|
|
816
|
+
:type module: str
|
|
798
817
|
|
|
799
818
|
Usage:
|
|
800
819
|
|
|
801
820
|
>>> # Calling the method:
|
|
802
821
|
>>> oHelper.SetLateralMenu("Updates > Registers > Products > Groups")
|
|
822
|
+
>>> oHelper.SetLateralMenu("Updates > Registers > Products > Groups", program_name="CRDA200", module="CRD")
|
|
803
823
|
"""
|
|
804
|
-
self.__router.SetLateralMenu(menuitens, save_input, click_menu_functional
|
|
824
|
+
self.__router.SetLateralMenu(menuitens, save_input, click_menu_functional,
|
|
825
|
+
program_name=program_name, module=module)
|
|
805
826
|
|
|
806
827
|
def SetParameters(self):
|
|
807
828
|
"""
|
|
@@ -1777,7 +1798,7 @@ class Poui():
|
|
|
1777
1798
|
"""
|
|
1778
1799
|
self.__poui.InputValue(field, value, position)
|
|
1779
1800
|
|
|
1780
|
-
def ClickCombo(self, field='', value='', position=1, second_value=''):
|
|
1801
|
+
def ClickCombo(self, field='', value='', position=1, second_value='', match_case=True):
|
|
1781
1802
|
"""
|
|
1782
1803
|
Clicks on the Combo of POUI component.
|
|
1783
1804
|
https://po-ui.io/documentation/po-combo
|
|
@@ -1785,6 +1806,10 @@ class Poui():
|
|
|
1785
1806
|
:param field: Combo text title that you want to click.
|
|
1786
1807
|
:param value: Value that you want to select in Combo.
|
|
1787
1808
|
:param position: Position which element is located. - **Default:** 1
|
|
1809
|
+
:param second_value: Secondary value displayed below the main value. - **Default:** "" (empty string)
|
|
1810
|
+
:type second_value: str
|
|
1811
|
+
:param match_case: If True, requires exact normalized match; if False, allows partial normalized match. - **Default:** True
|
|
1812
|
+
:type match_case: bool
|
|
1788
1813
|
|
|
1789
1814
|
Usage:
|
|
1790
1815
|
|
|
@@ -1792,7 +1817,7 @@ class Poui():
|
|
|
1792
1817
|
>>> oHelper.ClickCombo('Visão', 'Compras')
|
|
1793
1818
|
:return:
|
|
1794
1819
|
"""
|
|
1795
|
-
self.__poui.click_combo(field, value, position, second_value)
|
|
1820
|
+
self.__poui.click_combo(field, value, position, second_value, match_case)
|
|
1796
1821
|
|
|
1797
1822
|
def ClickSelect(self, field='', value='', position=1):
|
|
1798
1823
|
"""
|
|
@@ -2278,7 +2303,7 @@ class Poui():
|
|
|
2278
2303
|
|
|
2279
2304
|
self.__poui.click_switch(label=label, value=value, position=position)
|
|
2280
2305
|
|
|
2281
|
-
def Program(self, program_name):
|
|
2306
|
+
def Program(self, program_name: str = '', module: str = ''):
|
|
2282
2307
|
"""
|
|
2283
2308
|
Method that sets the program in the initial menu search field.
|
|
2284
2309
|
|
|
@@ -2287,13 +2312,16 @@ class Poui():
|
|
|
2287
2312
|
|
|
2288
2313
|
:param program_name: The program name
|
|
2289
2314
|
:type program_name: str
|
|
2315
|
+
:param module: Module abbreviation used to differentiate routines with the same name. - **Default:** "" (empty string)
|
|
2316
|
+
:type module: str
|
|
2290
2317
|
|
|
2291
2318
|
Usage:
|
|
2292
2319
|
|
|
2293
2320
|
>>> # Calling the method:
|
|
2294
2321
|
>>> oHelper.Program("MATA020")
|
|
2322
|
+
>>> oHelper.Program("CRDA200", module="CRD")
|
|
2295
2323
|
"""
|
|
2296
|
-
self.__poui.Program(program_name)
|
|
2324
|
+
self.__poui.Program(program_name=program_name, module=module)
|
|
2297
2325
|
|
|
2298
2326
|
|
|
2299
2327
|
def ClickDropdown(self, label='', subitems='', position=1):
|
|
@@ -2337,3 +2365,14 @@ class Poui():
|
|
|
2337
2365
|
"""
|
|
2338
2366
|
self.config._flag_is_new_browse = True
|
|
2339
2367
|
self.__poui._set_browse_filters(filters)
|
|
2368
|
+
|
|
2369
|
+
def RemoveBrowseFilters(self):
|
|
2370
|
+
"""
|
|
2371
|
+
Removes all active filters from the THF Browse (kendo-grid) component.
|
|
2372
|
+
|
|
2373
|
+
Usage:
|
|
2374
|
+
|
|
2375
|
+
>>> # Call the method:
|
|
2376
|
+
>>> oHelper.RemoveBrowseFilters()
|
|
2377
|
+
"""
|
|
2378
|
+
self.__poui._remove_filters_from_browse()
|
|
@@ -229,10 +229,10 @@ class Base(unittest.TestCase):
|
|
|
229
229
|
return True
|
|
230
230
|
|
|
231
231
|
except StaleElementReferenceException:
|
|
232
|
-
logger().
|
|
232
|
+
logger().debug("********Element Stale click*********")
|
|
233
233
|
return False
|
|
234
234
|
except Exception as e:
|
|
235
|
-
logger().
|
|
235
|
+
logger().debug(f"Warning click method Exception: {str(e)}")
|
|
236
236
|
return False
|
|
237
237
|
|
|
238
238
|
def compare_field_values(self, field, user_value, captured_value, message):
|
|
@@ -131,6 +131,7 @@ class ConfigLoader:
|
|
|
131
131
|
self.sso_login = ("SSOLogin" in data and bool(data["SSOLogin"]))
|
|
132
132
|
self.new_home = ("NewHome" in data and bool(data["NewHome"]))
|
|
133
133
|
self._flag_is_new_browse = None
|
|
134
|
+
self.routine_module = ""
|
|
134
135
|
|
|
135
136
|
|
|
136
137
|
def check_keys(self, json_data):
|
|
@@ -94,6 +94,7 @@ class LanguagePack:
|
|
|
94
94
|
self.filters = languagepack["Filters"]
|
|
95
95
|
self.apply_filters = languagepack["Apply Filters"]
|
|
96
96
|
self.remove_filters = languagepack["Remove Filters"]
|
|
97
|
+
self.remove_all_filters = languagepack["Remove All Filters"]
|
|
97
98
|
self.old_browse_edit = languagepack["Old Browse Edit"]
|
|
98
99
|
self.old_browse_delete = languagepack["Old Browse Delete"]
|
|
99
100
|
self.old_browse_insert = languagepack["Old Browse Insert"]
|
|
@@ -206,6 +207,7 @@ class LanguagePack:
|
|
|
206
207
|
"Filters": "Filters",
|
|
207
208
|
"Apply Filters": "Apply filters",
|
|
208
209
|
"Remove Filters": "Remove filters",
|
|
210
|
+
"Remove All Filters": "Remove all",
|
|
209
211
|
|
|
210
212
|
"Old Browse Edit":"Edit",
|
|
211
213
|
"Old Browse Delete":"Delete",
|
|
@@ -315,6 +317,7 @@ class LanguagePack:
|
|
|
315
317
|
"Filters": "Filtros",
|
|
316
318
|
"Apply Filters": "Aplicar Filtros",
|
|
317
319
|
"Remove Filters": "Remover filtros",
|
|
320
|
+
"Remove All Filters": "Remover todos",
|
|
318
321
|
|
|
319
322
|
"Old Browse Edit":"Alterar",
|
|
320
323
|
"Old Browse Delete":"Excluir",
|
|
@@ -423,6 +426,7 @@ class LanguagePack:
|
|
|
423
426
|
"Filters": "Filtros",
|
|
424
427
|
"Apply Filters": "Aplicar Filtros",
|
|
425
428
|
"Remove Filters": "Eliminar filtros",
|
|
429
|
+
"Remove All Filters": "Eliminar todos",
|
|
426
430
|
"Old Browse Edit":"Modificar",
|
|
427
431
|
"Old Browse Delete":"Borrar",
|
|
428
432
|
"Old Browse Insert":"Incluir",
|
|
@@ -532,6 +536,7 @@ class LanguagePack:
|
|
|
532
536
|
"Filters": "Фильтры",
|
|
533
537
|
"Apply Filters": "Применить фильтры",
|
|
534
538
|
"Remove Filters": "Удалить фильтры",
|
|
539
|
+
"Remove All Filters": "Удалить все",
|
|
535
540
|
|
|
536
541
|
"Old Browse Edit":"Редактировать",
|
|
537
542
|
"Old Browse Delete":"Удалить",
|
|
@@ -87,11 +87,16 @@ class Router:
|
|
|
87
87
|
|
|
88
88
|
return self._ensure_poui() if condition_fn() else self._ensure_webapp()
|
|
89
89
|
|
|
90
|
-
def Program(self, program_name: str = "",
|
|
90
|
+
def Program(self, program_name: str = "", module: str = '') -> None:
|
|
91
91
|
"""Execute program using appropriate driver (POUI or WebApp)."""
|
|
92
92
|
|
|
93
93
|
drv = self._get_driver_instance(lambda: self.config.new_home)
|
|
94
|
-
|
|
94
|
+
if not self.config.new_home:
|
|
95
|
+
# webapp
|
|
96
|
+
drv.Program(program_name=program_name)
|
|
97
|
+
else:
|
|
98
|
+
# poui
|
|
99
|
+
drv.Program(program_name=program_name, module=module)
|
|
95
100
|
|
|
96
101
|
"""
|
|
97
102
|
Sync POUI → WebApp program name (new_home):
|
|
@@ -109,11 +114,19 @@ class Router:
|
|
|
109
114
|
drv = self._get_driver_instance(lambda: self.config.new_home)
|
|
110
115
|
drv.set_program(program_name=program_name, program_desc=program_desc)
|
|
111
116
|
|
|
112
|
-
def SetLateralMenu(self, menu_itens: str, save_input: bool = True, click_menu_functional: bool = False
|
|
117
|
+
def SetLateralMenu(self, menu_itens: str, save_input: bool = True, click_menu_functional: bool = False,
|
|
118
|
+
program_name:str = '', module: str = '') -> None:
|
|
113
119
|
"""Navigate through lateral menu."""
|
|
114
120
|
|
|
115
121
|
drv = self._get_driver_instance(lambda: self.config.new_home)
|
|
116
|
-
|
|
122
|
+
if not self.config.new_home:
|
|
123
|
+
# webapp
|
|
124
|
+
drv.SetLateralMenu(menu_itens=menu_itens, save_input=save_input,
|
|
125
|
+
click_menu_functional=click_menu_functional)
|
|
126
|
+
else:
|
|
127
|
+
# poui
|
|
128
|
+
drv.SetLateralMenu(menu_itens=menu_itens, program_name=program_name,
|
|
129
|
+
module=module, save_input=save_input)
|
|
117
130
|
|
|
118
131
|
def ChangeEnvironment(self, date: str = "", group: str = "", branch: str = "", module: str = "") -> None:
|
|
119
132
|
"""Change environment settings."""
|