JALA Academy is the world’s first Academy offering 100% Job guarantee Programs
without Trainers from 0 to 20 years’ experience.
Anyone who wants to build solid career in IT can enroll.
Read JALA Academy website and contact us for any career advice and questions.
3. Web Driver Methods
These are commonly used Selenium WebDriver methods. Here's a brief
explanation of each:
get(url) – Opens the specified URL in the browser.
getCurrentUrl() – Returns the current URL of the web page.
getTitle() – Retrieves the title of the current page.
getPageSource() – Returns the HTML source code of the page.
findElement(By.locator) – Finds and returns the first matching web element.
findElements(By.locator) – Finds and returns a list of matching web elements.
getWindowHandle() – Returns the unique identifier of the current window.
getWindowHandles() – Returns all window handles in a set.
switchTo() – Switches control between frames, alerts, or windows.
manage() – Provides options to manage timeouts, cookies, and window size.
driver.navigate().to(url) – Navigates to the specified URL.
driver.navigate().back() – Moves to the previous page in browser history.
driver.navigate().forward() – Moves forward in browser history.
driver.navigate().refresh() – Refreshes the current web page.
click() – Clicks on a web element.
sendKeys(value) – Sends text input to a web element.
getAttribute("attributeName") – Retrieves the value of a specified attribute.
getTagName() – Returns the tag name of the element.
getText() – Retrieves the visible text of a web element.
isDisplayed() – Checks if an element is visible on the page.
isEnabled() – Checks if an element is enabled (interactive).
isSelected() – Checks if a checkbox, radio button, or option is selected.
driver.quit() – Closes all browser windows and ends the WebDriver session.
driver.close() – Closes the current browser window.
Thread.sleep(milliseconds) – Pauses execution for a specified duration.
getSize() – Returns the width and height of an element.
getLocation() – Returns the x and y coordinates of an element.
There's a typo in gfetPageSource(), it should be getPageSource(), and
getTagName(0 should be getTagName().
JALA Academy offers Job Guarantee Programs, Income Earning Opportunities, and Internship with
stipend on Full Stack, MERN Stack, QA, Test Automation, RPA, Cloud Technologies, DevOps and Cyber
Security. Read our website JALA Academy for more details.