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

In this Selenium Webdriver Tutorial, we will learn about a 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:

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

✅ getWindowHandles(): Return a set of window handles that 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.