I have this progress Bar element, as soon as I upload an image the width of the element changes from 0% to 100%
now what I want to do is wait until that element is 100% before doing the next steps in my Python Selenium script. Mainly I want to know if I can just do something like this:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//div[@class='bar'] [ADD HERE SOMETHING THAT'S LIKE: STYLE WIDTH==100%")))
Anything possible to do so?
CodePudding user response:
This should work:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//div[@class='bar'][contains(@style,'width: 100%')]