Select Frames
Select Frames
• s.isMultiple();
If it is multiple select dropdown returns True if not
False.
• To get all the options from drop down we have
method called getOptions()
s.getOptions();
• Inorder to get the selected options we have a
method called getAllSelectedOptions();
S. getAllSelectedOptions();
Frames :
What is frame ?
Frames are the web pages which is inside another web
page
How do you get to know or identify frame ?
When we right click and inspect we can see an option
called frame, then we can understand that is a frame
How to handle the frame?
Handling frames through index:
• In order to handle frame first we have to shift our
control to frames with below statement.
• driver.switchTo().frame();
• frame()----> This method is available in
TargetLocator nested interface
• To Switch back our control from frame to normal
page we have to write below statement
• driver.switchTo().defaultContent();
driver.switchTo().frame("id or name
value of the element");
Handling frames through WebElement:
• Here we will fetch the address of frame and stores
in reference variable like ele.
• driver.switchTo().frame(ele);