tir-framework 2.7.0__tar.gz → 2.8.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.8.0}/PKG-INFO +1 -1
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/main.py +47 -10
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/base.py +2 -2
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/config.py +1 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/language.py +5 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/router.py +17 -4
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/poui_internal.py +165 -76
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/webapp_internal.py +287 -182
- tir_framework-2.8.0/tir/version.py +1 -0
- {tir_framework-2.7.0 → tir_framework-2.8.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.8.0}/LICENSE +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/MANIFEST.in +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/README.md +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/setup.cfg +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/setup.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tests/test_log.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tests/test_utils.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tests/test_webapp_internal_clicktree.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/__init__.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/apw_internal.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/base_database.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/data/sx3.csv +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/drivers/linux64/geckodriver +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/drivers/windows/chromedriver.exe +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/drivers/windows/electron/chromedriver.exe +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/drivers/windows/geckodriver.exe +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/enumerations.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/events.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/log.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/logging_config.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/numexec.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/psutil_info.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/third_party/screen_size.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/third_party/xpath_soup.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir/technologies/core/utils.py +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir_framework.egg-info/SOURCES.txt +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir_framework.egg-info/dependency_links.txt +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir_framework.egg-info/requires.txt +0 -0
- {tir_framework-2.7.0 → tir_framework-2.8.0}/tir_framework.egg-info/top_level.txt +0 -0
|
@@ -476,7 +476,7 @@ class Webapp():
|
|
|
476
476
|
"""
|
|
477
477
|
self.__webapp.MessageBoxClick(button_text)
|
|
478
478
|
|
|
479
|
-
def Program(self, program_name):
|
|
479
|
+
def Program(self, program_name: str, module: str = ''):
|
|
480
480
|
"""
|
|
481
481
|
Method that sets the program in the initial menu search field.
|
|
482
482
|
|
|
@@ -485,13 +485,16 @@ class Webapp():
|
|
|
485
485
|
|
|
486
486
|
:param program_name: The program name
|
|
487
487
|
:type program_name: str
|
|
488
|
+
:param module: Module abbreviation used to differentiate routines with the same name. - **Default:** "" (empty string)
|
|
489
|
+
:type module: str
|
|
488
490
|
|
|
489
491
|
Usage:
|
|
490
492
|
|
|
491
493
|
>>> # Calling the method:
|
|
492
494
|
>>> oHelper.Program("MATA020")
|
|
495
|
+
>>> oHelper.Program("CRDA200", module="CRD")
|
|
493
496
|
"""
|
|
494
|
-
self.__router.Program(program_name)
|
|
497
|
+
self.__router.Program(program_name=program_name, module=module)
|
|
495
498
|
|
|
496
499
|
def RestoreParameters(self):
|
|
497
500
|
"""
|
|
@@ -615,6 +618,11 @@ class Webapp():
|
|
|
615
618
|
- **Default:** []
|
|
616
619
|
:type filters: list[dict[str, str]]
|
|
617
620
|
|
|
621
|
+
.. note::
|
|
622
|
+
When used with the **New Browse** (kendo-grid), this method automatically removes all
|
|
623
|
+
active filters before performing the search, ensuring the results are not affected by
|
|
624
|
+
previously applied filter conditions.
|
|
625
|
+
|
|
618
626
|
Usage:
|
|
619
627
|
|
|
620
628
|
>>> # To search using the first search box and default search key:
|
|
@@ -788,20 +796,31 @@ class Webapp():
|
|
|
788
796
|
"""
|
|
789
797
|
self.__webapp.SetKey(key, grid, grid_number,additional_key, wait_show, step, wait_change)
|
|
790
798
|
|
|
791
|
-
def SetLateralMenu(self, menuitens, save_input=True, click_menu_functional=False
|
|
799
|
+
def SetLateralMenu(self, menuitens, save_input=True, click_menu_functional=False,
|
|
800
|
+
program_name:str = '', module: str = ''):
|
|
792
801
|
"""
|
|
793
802
|
Navigates through the lateral menu using provided menu path.
|
|
794
803
|
e.g. "MenuItem1 > MenuItem2 > MenuItem3"
|
|
795
804
|
|
|
796
|
-
:param
|
|
797
|
-
:type
|
|
805
|
+
:param menuitens: String with the path to the menu.
|
|
806
|
+
:type menuitens: str
|
|
807
|
+
:param save_input: Keeps compatibility with WebApp lateral menu behavior. - **Default:** True
|
|
808
|
+
:type save_input: bool
|
|
809
|
+
:param click_menu_functional: Uses functional menu click strategy in WebApp. - **Default:** False
|
|
810
|
+
:type click_menu_functional: bool
|
|
811
|
+
:param program_name: Program name to be used in New Home (POUI) when routine descriptions are duplicated. - **Default:** "" (empty string)
|
|
812
|
+
:type program_name: str
|
|
813
|
+
:param module: Module abbreviation used to differentiate routines with the same name in New Home (POUI). - **Default:** "" (empty string)
|
|
814
|
+
:type module: str
|
|
798
815
|
|
|
799
816
|
Usage:
|
|
800
817
|
|
|
801
818
|
>>> # Calling the method:
|
|
802
819
|
>>> oHelper.SetLateralMenu("Updates > Registers > Products > Groups")
|
|
820
|
+
>>> oHelper.SetLateralMenu("Updates > Registers > Products > Groups", program_name="CRDA200", module="CRD")
|
|
803
821
|
"""
|
|
804
|
-
self.__router.SetLateralMenu(menuitens, save_input, click_menu_functional
|
|
822
|
+
self.__router.SetLateralMenu(menuitens, save_input, click_menu_functional,
|
|
823
|
+
program_name=program_name, module=module)
|
|
805
824
|
|
|
806
825
|
def SetParameters(self):
|
|
807
826
|
"""
|
|
@@ -1777,7 +1796,7 @@ class Poui():
|
|
|
1777
1796
|
"""
|
|
1778
1797
|
self.__poui.InputValue(field, value, position)
|
|
1779
1798
|
|
|
1780
|
-
def ClickCombo(self, field='', value='', position=1, second_value=''):
|
|
1799
|
+
def ClickCombo(self, field='', value='', position=1, second_value='', match_case=True):
|
|
1781
1800
|
"""
|
|
1782
1801
|
Clicks on the Combo of POUI component.
|
|
1783
1802
|
https://po-ui.io/documentation/po-combo
|
|
@@ -1785,6 +1804,10 @@ class Poui():
|
|
|
1785
1804
|
:param field: Combo text title that you want to click.
|
|
1786
1805
|
:param value: Value that you want to select in Combo.
|
|
1787
1806
|
:param position: Position which element is located. - **Default:** 1
|
|
1807
|
+
:param second_value: Secondary value displayed below the main value. - **Default:** "" (empty string)
|
|
1808
|
+
:type second_value: str
|
|
1809
|
+
:param match_case: If True, requires exact normalized match; if False, allows partial normalized match. - **Default:** True
|
|
1810
|
+
:type match_case: bool
|
|
1788
1811
|
|
|
1789
1812
|
Usage:
|
|
1790
1813
|
|
|
@@ -1792,7 +1815,7 @@ class Poui():
|
|
|
1792
1815
|
>>> oHelper.ClickCombo('Visão', 'Compras')
|
|
1793
1816
|
:return:
|
|
1794
1817
|
"""
|
|
1795
|
-
self.__poui.click_combo(field, value, position, second_value)
|
|
1818
|
+
self.__poui.click_combo(field, value, position, second_value, match_case)
|
|
1796
1819
|
|
|
1797
1820
|
def ClickSelect(self, field='', value='', position=1):
|
|
1798
1821
|
"""
|
|
@@ -2278,7 +2301,7 @@ class Poui():
|
|
|
2278
2301
|
|
|
2279
2302
|
self.__poui.click_switch(label=label, value=value, position=position)
|
|
2280
2303
|
|
|
2281
|
-
def Program(self, program_name):
|
|
2304
|
+
def Program(self, program_name: str = '', module: str = ''):
|
|
2282
2305
|
"""
|
|
2283
2306
|
Method that sets the program in the initial menu search field.
|
|
2284
2307
|
|
|
@@ -2287,13 +2310,16 @@ class Poui():
|
|
|
2287
2310
|
|
|
2288
2311
|
:param program_name: The program name
|
|
2289
2312
|
:type program_name: str
|
|
2313
|
+
:param module: Module abbreviation used to differentiate routines with the same name. - **Default:** "" (empty string)
|
|
2314
|
+
:type module: str
|
|
2290
2315
|
|
|
2291
2316
|
Usage:
|
|
2292
2317
|
|
|
2293
2318
|
>>> # Calling the method:
|
|
2294
2319
|
>>> oHelper.Program("MATA020")
|
|
2320
|
+
>>> oHelper.Program("CRDA200", module="CRD")
|
|
2295
2321
|
"""
|
|
2296
|
-
self.__poui.Program(program_name)
|
|
2322
|
+
self.__poui.Program(program_name=program_name, module=module)
|
|
2297
2323
|
|
|
2298
2324
|
|
|
2299
2325
|
def ClickDropdown(self, label='', subitems='', position=1):
|
|
@@ -2337,3 +2363,14 @@ class Poui():
|
|
|
2337
2363
|
"""
|
|
2338
2364
|
self.config._flag_is_new_browse = True
|
|
2339
2365
|
self.__poui._set_browse_filters(filters)
|
|
2366
|
+
|
|
2367
|
+
def RemoveBrowseFilters(self):
|
|
2368
|
+
"""
|
|
2369
|
+
Removes all active filters from the THF Browse (kendo-grid) component.
|
|
2370
|
+
|
|
2371
|
+
Usage:
|
|
2372
|
+
|
|
2373
|
+
>>> # Call the method:
|
|
2374
|
+
>>> oHelper.RemoveBrowseFilters()
|
|
2375
|
+
"""
|
|
2376
|
+
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)
|
|
117
130
|
|
|
118
131
|
def ChangeEnvironment(self, date: str = "", group: str = "", branch: str = "", module: str = "") -> None:
|
|
119
132
|
"""Change environment settings."""
|