Selenium WebDriver Tutorial #23 – How to Handle Frames in Selenium

In this Selenium Webdriver Tutorial we will learn How to Handle Frames in Selenium WebDriver. We will learn with real examples to handle multiple frames/iframes on any webpage. Selenium provides the method “SwitchTo()” in order to switch among different frames on page.

You can switch focus to frames within any webpage using 3 ways.

✅ By Index

✅ By Name or Id

✅ By Web Element

Selenium WebDriver Tutorial #15 – Basic Methods in WebDriver Interface – Part 2

In this Selenium Webdriver Tutorial we will learn about few more basic methods in WebDriver Interface. We will understand the basic methods along with examples and how to use those methods in Selenium Automation. Some of the methods which we will learn are:

✅ getWindowHandle(): Return an opaque handle to this window that uniquely identifies it within this driver instance.

✅ getWindowHandles(): Return a set of window handles which can be used to iterate over all open windows of this WebDriver instance by passing them to switchTo().WebDriver.Options.window()

✅ switchTo(): Send future commands to a different frame or window.

✅ findElement(By by): Find the first WebElement using the given method.

✅ findElements(By by): Find all elements within the current page using the given mechanism.