In this Selenium Webdriver Tutorial we will understand about WebDriver Interface and how to read Selenium WebDriver Javadoc. We will understand the reason behind the commands: WebDriver driver = new ChromeDriver(); OR WebDriver driver = new FirefoxDriver(); or any other browser objects.
Category: Selenium WebDriver Tutorial
Selenium WebDriver Tutorial #12 – What are Locators in Selenium WebDriver
In this Selenium Webdriver Tutorial we will learn about what are Locators in Selenium WebDriver. There are 8 primary locator strategies to identify web elements on any web page. Along with these 8 strategies Selenium 4 brings Relative Locators strategy as well.
Selenium WebDriver Tutorial #13 – What is Relative Locator in Selenium
In this Selenium Webdriver Tutorial we will learn about Relative locator in Selenium Webdriver. Selenium 4 introduced relative locators which were previously called as friendly locators. Relative locator help to locate elements that are nearby to other elements.
Selenium WebDriver Tutorial #14 – What are the Basic Methods in WebDriver Interface
In this Selenium Webdriver Tutorial we will learn about “What are the 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 basic WebDriver Interface methods are:
✅ get(java.lang.String url): Load a new web page in the current browser window.
✅ manage(): Gets the Option interface.
✅ getCurrentUrl(): Get a string representing the current URL that the browser is looking at.
✅ getTitle(): The title of the current page.
✅ getPageSource(): Get the source of the last loaded page.
✅ navigate(): An abstraction allowing the driver to access the browser’s history and to navigate to a given URL. ✅ quit(): Quits this driver, closing every associated window.
✅ close(): Close the current window, quitting the browser if it’s the last window currently open.
✅ 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.
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.