Frames is an html document which is embedded inside another document. If
we right click on any element in context menu if it shows "this
frame" then element is present inside another frame.
driver.switchTo().frame(int index no);
driver.SwitchTo().defaultContent();
Inorder to handle this we should transfer control to frame. This can be done by
using 3 ways:
driver.switchTo().frame(int index no);
driver.switchTo().frame(String frame name);
driver.switchTo().frame(Web Element frameElement);
After switching to frame we can perform any operation only within frame.
In order to handle the element which is outside frame we should transfer back
control to main browser by following statement;
driver.SwitchTo().defaultContent();
Nice post
ReplyDelete