The website has the following elements:
It has 3 different frames, how do I navigate myself to the
You can actually select an iFrame using the below methods: -
frame(Name of Frame [or] Id of the frame)
frame(WebElement frameElement)
So you can switch by passing the any above information about the frame. Yes you need to switch everytime according to require action
As we can see your frame have different name like :- top
, navigation
etc. Use name of the frame to switch between them
Example:-
driver.SwitchTo().Frame("top");
.... Perform your action on frame
driver.SwitchTo().defaultContent();
driver.SwitchTo().Frame("navigation");
.... Perform your action on frame
driver.SwitchTo().defaultContent();
Hope it will help you :)
I have done this in the past using:
m_internetExplorerDriver.SwitchTo().DefaultContent();
//put your name or id instead, e.g. "navigation" instead of "menuframe"
m_internetExplorerDriver.SwitchTo().Frame("menuframe");
Basically you use the Frame() method to switch between frames..
In this question you can read how to identify the frame:
How to identify and switch to the frame in selenium webdriver when frame does not have id