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.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.