How to switch back to default content (or switch iframes) in Selenium IDE -
i have navigate website build framework, , kind of "a special snowflake"
it consists of 3 iframes, 1 "active" others set display: none. everytime move 1 page another, new page loaded in iframe.
now, if want access element in new active iframe error "element not found"
with webdriver solved problem doing following
webelement currentframe = _driver.findelement(by .xpath("//iframe[not(contains(@style,'display: none'))]")); _driver.switchto().frame(currentframe); .... driver.switchto().defaultcontent(); .... webelement currentframe = _driver.findelement(by .xpath("//iframe[not(contains(@style,'display: none'))]")); _driver.switchto().frame(currentframe);
in selenium ide managed find first frame
command: selectframe target: //iframe[not(contains(@style,'display: none'))]
but @ point stuck. if go , click command-sequence myself fine, when try whole testcase, doesn't find elements in new iframe tried pause, , wait 10 seconds in case new frame hasn't finished loading yet, didn't make difference.
it seems able switch default content doing :
command :selectwindow
no target, no value
Comments
Post a Comment