vicusbass
vicusbass

Reputation: 1804

How to approach IFrame and LoadableComponent in Selenium?

what would be a good approach in modelling a page using LoadableComponent when most of the content is in an iframe? I was thinking about an inner class, but not sure about it.

Upvotes: 0

Views: 175

Answers (2)

cegprakash
cegprakash

Reputation: 3125

use

driver.switchTo().frame("marco");   

replace "marco" with your own frame name

Upvotes: 1

Nathan Merrill
Nathan Merrill

Reputation: 8386

I haven't dealt with IFrames much, but I believe that LoadableComponent would still be a good way to do it. I do have many pages that contain other pages referenced within itself.

However, I cannot think of a way to have the pages do a seamless switch to the iframe and back (unless you want to write a custom getter for each element), so that would still need to be in your test code.

Upvotes: 1

Related Questions