python - Selenium - upload file to iframe -
i have test has method upload file in form located in iframe
.
the problem test not stable , fails error (run 3 times error example, third run failed):
def fill_offer_image(self): driver = self.app.driver driver.switch_to.frame(driver.find_elements_by_name("upload_iframe")[3]) e indexerror: list index out of range
i have implicitly wait = 10
, can consider few iframes on page same class i've been forced use arrays. , not (or all?) iframes loaded.
does have thoughts how improve stability of test? relate mechanics of iframe itself?
lets try giving time iframe load inserting below code
import time ## give time iframe load ## time.sleep(xxx)
hope work
Comments
Post a Comment