[2024-09-20T03:20:18.852Z] self = ValidationUI Web Page, locator = ('page-sidebar', 'id')
[2024-09-20T03:20:18.852Z] attribute = 'innerHTML', safe = False
[2024-09-20T03:20:18.852Z]
[2024-09-20T03:20:18.852Z] def get_element_attribute(self, locator, attribute, safe: bool = False):
[2024-09-20T03:20:18.852Z] """
[2024-09-20T03:20:18.852Z] Get attribute from WebElement
[2024-09-20T03:20:18.852Z]
[2024-09-20T03:20:18.852Z] Args:
[2024-09-20T03:20:18.852Z] locator (tuple): (GUI element needs to operate on (str), type (By)).
[2024-09-20T03:20:18.852Z] attribute (str): the value of this attribute will be extracted from WebElement
[2024-09-20T03:20:18.852Z] safe(bool): if True exception will not raise when element not found. Default option - not safe
[2024-09-20T03:20:18.852Z]
[2024-09-20T03:20:18.852Z] Returns:
[2024-09-20T03:20:18.852Z] str: value of the attribute of requested and found WebElement
[2024-09-20T03:20:18.852Z] """
[2024-09-20T03:20:18.852Z] web_elements = self.get_elements(locator)
[2024-09-20T03:20:18.852Z] if safe:
[2024-09-20T03:20:18.852Z] if not len(web_elements):
[2024-09-20T03:20:18.852Z] return
[2024-09-20T03:20:18.852Z] > return web_elements[0].get_attribute(attribute)
[2024-09-20T03:20:18.852Z] [1m[31mE IndexError: list index out of range[0m
[2024-09-20T03:20:18.852Z]
[2024-09-20T03:20:18.852Z] [1m[31mocs_ci/ocs/ui/base_ui.py[0m:465: IndexError
The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
- **[OWNERS](https://github.com/red-hat-storage/ocs-ci/blob/master/OWNERS)**
Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
fix the error:
Test-run with failure: https://ocs4-jenkins-csb-odf-qe.apps.ocp-c1.prod.psi.redhat.com/job/qe-deploy-ocs-cluster/42269/ g-drive | | https://drive.google.com/drive/folders/1JQI9VOKrdVOR4254tajS7XDXdux2pq87?usp=sharing