How can I click list of elements in one frame (or) container?
Selenium provides two methods to deal with iFrames.
You can search for a iFrame with id IFRAME_ID
And you can return to the context of the root element:
Of course, you can chain iFrames:
Meaning you will enter in the iFrame with ID IFRAME_ID2 which is inside the IFRAME_ID1.
If they were siblings, you would need to return to the default context:
driver.switchTo().frame(IFRAME_ID1); driver.switchTo().defaultContent(); driver.switchTo().frame(IFRAME_ID2);
After switching to a iFrame, you can use WebDriver and WebElements as if the only the DOM branches inside the iFrame exist.