Frames are HTML pages that are used inside the main HTML tags. A frame is an HTML tag written as <frame>. It is used to divide the web page into various sections. It specifies each frame within the <frameset> tag. Iframes or Inline frames is written as <iframe>and this is also another tag in HTML, but it is used to embed some other document into the current HTML document. The method to handle frames and iframes in Selenium is the same. We will only see how to handle frames here.
Refer to the FramesDemo.html given in the following code:
<!DOCTYPE html>
<html>
<frameset cols="25%,50%,*">
<frame name="frame1" src="C:\Frame1.html">
<frame name="frame2" src="C:\Frame2.html">
<frame name="frame3" src="C:\Frame3.html">
</frameset...