Issue
I have been trying to click the element highlighted below:
I have tried everything that I could within my knowledge. Here are some of the codes that I've tried:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div[1]/root/mat-sidenav-container/mat-sidenav-content/div/div/workspace-view/fluent-workspace/mat-sidenav-container/mat-sidenav-content/fluent-workspace-list/fluent-list-table-base/div/cdk-virtual-scroll-viewport/div[1]/div[1]/div[2]/span/button[1]/mat-icon"))).click()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CLASS_NAME, "quick-action-button ng-star-inserted"))).click()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.ID, "Refresh Now"))).click()
And many more but I just can't seem to click the element. One thing worth noting is that the button on the screen becomes apparent when hovering over it.
Before Hover
After Hover
Any help would be greatly appreciated.
Solution
element_to_hover_over = driver.find_element_by_xpath("xpath")
hover = ActionChains(driver).move_to_element(element_to_hover_over)
hover.perform()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "xpath"))).click()
Answered By - Nicodeno S
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.