Hey Pallavi, there are a few ways of switching control to a frame in Selenium Webdriver. Some of them are:
-
Using frame Id or Name: You can use frame's ID or Name to identify it and then use switchTo() method for switching.
-
Using frame Index: You can also use frame index as there are index values for each frame and to get the first frame you can use frame(0) and so on.
-
Using Xpath or CSS Selectors: Xpath and CSS Selectors can also be used to identify a frame.