Access contents of dynamically generated iframe in Selenium -
i want use xpath (or other selenium dsl locator) access dynamically created iframe.  goal make assertions contents of dynamic iframe.
the iframe not have id , has following html attributes:
src="javascript:""" style="position: absolute; left: -2000px;"   if can somehow selectframe iframe, can asserttext or use xpath test iframe innards.
however, simple approaches seem fail.  selectframe("index=0") fails reason.  perhaps need way waitfor iframe loaded.  can't seem create locator identifier iframe, can't waitfor it.
have tried these tips selenium docs?
selectframe ( locator ) selects frame within current window. (you may invoke command multiple times select nested frames.) select parent frame, use "relative=parent" locator; select top frame, use "relative=top". may use dom expression identify frame want directly, this: dom=frames["main"].frames["subframe"]
http://release.seleniumhq.org/selenium-core/0.8.0/reference.html
Comments
Post a Comment