Open kchaya1 opened 11 months ago
Sorry for the late reply,
What you could do is to add something like
try:
a = self.driver.find_element(By.XPATH, '//a[@class="down-arrow bounce"]')
a.click()
tm.sleep(STEP_TIME)
except NoSuchElementException:
# No arrow
In this way, if there is no arrow you will not get any error, it is a way just to skip that step
The way the code works rn relies on the code clicking this button:
right here: https://github.com/dvalbuena1/visa_rescheduler_aws/blob/main/visa.py#L112
However, I got some errors saying that this element is not interactable. I modified my lambda to take a screenshot of the current webpage and store it in s3 whenever this happens. This is what that screenshot looks like:
SO basically, there are times when that down-arrow bounce doesn't appear on the website.
I also logged out all the CSS elements on the page whenever this happens. For the down arrow bounce, this is what my logs say:
INFO:log_css_elements_upload_screenshot_s3 - Element tag: a, class: down-arrow bounce, is_visible:False, is_enabled:True, interactable: False
So basically it is "enabled" but not "visible", and thus it cant be interacted with. Anyone else see this issue? So sometimes, the down-arrow bounce is not there. I think we will need some special logic to check if its not interactable, proceed with the rest of the steps anyway.