robo_appian 0.0.17__py3-none-any.whl → 0.0.18__py3-none-any.whl
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.
Potentially problematic release.
This version of robo_appian might be problematic. Click here for more details.
- robo_appian/components/TabUtils.py +13 -8
- {robo_appian-0.0.17.dist-info → robo_appian-0.0.18.dist-info}/METADATA +1 -1
- {robo_appian-0.0.17.dist-info → robo_appian-0.0.18.dist-info}/RECORD +5 -5
- {robo_appian-0.0.17.dist-info → robo_appian-0.0.18.dist-info}/LICENSE +0 -0
- {robo_appian-0.0.17.dist-info → robo_appian-0.0.18.dist-info}/WHEEL +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from selenium.webdriver.common.by import By
|
|
2
2
|
from selenium.webdriver.support import expected_conditions as EC
|
|
3
|
+
from selenium.webdriver.support.ui import WebDriverWait
|
|
4
|
+
from selenium.webdriver.remote.webelement import WebElement
|
|
3
5
|
from robo_appian.utils.ComponentUtils import ComponentUtils
|
|
4
6
|
|
|
5
7
|
|
|
@@ -22,9 +24,16 @@ class TabUtils:
|
|
|
22
24
|
|
|
23
25
|
driver.quit()
|
|
24
26
|
"""
|
|
27
|
+
@staticmethod
|
|
28
|
+
def __click(wait: WebDriverWait, component: WebElement, label: str):
|
|
29
|
+
try:
|
|
30
|
+
component = wait.until(EC.element_to_be_clickable(component))
|
|
31
|
+
component.click()
|
|
32
|
+
except Exception:
|
|
33
|
+
raise Exception(f"Tab with label '{label}' is not clickable.")
|
|
25
34
|
|
|
26
35
|
@staticmethod
|
|
27
|
-
def findTabByLabelText(wait, label):
|
|
36
|
+
def findTabByLabelText(wait: WebDriverWait, label: str) -> WebElement:
|
|
28
37
|
xpath = f'//div/div[@role="link" ]/div/div/div/div/div/p[normalize-space(.)="{label}"]'
|
|
29
38
|
try:
|
|
30
39
|
component = wait.until(EC.visibility_of_element_located((By.XPATH, xpath)))
|
|
@@ -33,16 +42,12 @@ class TabUtils:
|
|
|
33
42
|
return component
|
|
34
43
|
|
|
35
44
|
@staticmethod
|
|
36
|
-
def selectTabByLabelText(wait, label):
|
|
45
|
+
def selectTabByLabelText(wait: WebDriverWait, label: str):
|
|
37
46
|
component = TabUtils.findTabByLabelText(wait, label)
|
|
38
|
-
|
|
39
|
-
component = wait.until(EC.element_to_be_clickable(component))
|
|
40
|
-
except Exception:
|
|
41
|
-
raise Exception(f"Tab with label '{label}' is not clickable.")
|
|
42
|
-
component.click()
|
|
47
|
+
TabUtils.__click(wait, component, label)
|
|
43
48
|
|
|
44
49
|
@staticmethod
|
|
45
|
-
def checkTabSelectedByLabelText(wait, label):
|
|
50
|
+
def checkTabSelectedByLabelText(wait: WebDriverWait, label: str):
|
|
46
51
|
component = TabUtils.findTabByLabelText(wait, label)
|
|
47
52
|
|
|
48
53
|
select_text = "Selected Tab."
|
|
@@ -7,7 +7,7 @@ robo_appian/components/LabelUtils.py,sha256=Fue3BDpqvHKGK_vBOtMld3Lai3ZQ2wzZPeQJ
|
|
|
7
7
|
robo_appian/components/LinkUtils.py,sha256=_m9dpHW9mUJFMcLp95K2s-YDYAvG-RlPF6giw3dmYcE,1389
|
|
8
8
|
robo_appian/components/SearchDropdownUtils.py,sha256=rjsC3kd8Z-eHAAzF4OBJVchStRV5pCB2dtpVEL6cdCQ,4519
|
|
9
9
|
robo_appian/components/SearchInputUtils.py,sha256=7sI8D6MXDzBPwbkIQodtxvXD2aA-8HiqvDCEJUlekZo,3263
|
|
10
|
-
robo_appian/components/TabUtils.py,sha256=
|
|
10
|
+
robo_appian/components/TabUtils.py,sha256=k-HkIK8ca-KnHXSDTXDV4190jT5P84tZ3frWSCndn5I,2257
|
|
11
11
|
robo_appian/components/TableUtils.py,sha256=SmtB4jq0XGZc0smMTe1HRvcCurQTXz3CytswbogfwTY,6059
|
|
12
12
|
robo_appian/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
robo_appian/controllers/ComponentDriver.py,sha256=jNaQrbKCFFyahpLKmipsA0v3p3bpjy9dMgW36IdE-Fw,4353
|
|
@@ -16,7 +16,7 @@ robo_appian/exceptions/MyCustomError.py,sha256=DVAkytXNNQNjqyTyCjk6FFd6fr3AsBe57
|
|
|
16
16
|
robo_appian/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
robo_appian/utils/ComponentUtils.py,sha256=sHHT-mcdhZs9hHIAVD3KkrgLFXn4gIo58NsHHhI156w,7088
|
|
18
18
|
robo_appian/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
robo_appian-0.0.
|
|
20
|
-
robo_appian-0.0.
|
|
21
|
-
robo_appian-0.0.
|
|
22
|
-
robo_appian-0.0.
|
|
19
|
+
robo_appian-0.0.18.dist-info/LICENSE,sha256=g-xR4dRa9_4iFkMoJmED-wE-J5hoxbk3105Knhfpjm0,1068
|
|
20
|
+
robo_appian-0.0.18.dist-info/METADATA,sha256=kbjqustBLua2sfLOP3uhL7awiy4Ykl6Y4nmnnY7ZpcA,2261
|
|
21
|
+
robo_appian-0.0.18.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
22
|
+
robo_appian-0.0.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|