0% found this document useful (0 votes)
34 views2 pages

Selenium WebDriver Tasks For Freshers

Selenium question bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Selenium WebDriver Tasks For Freshers

Selenium question bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Selenium WebDriver Task List for

Freshers
This document contains a list of tasks to help freshers practice Selenium WebDriver
methods after the Knowledge Transfer (KT) session. The tasks are structured to gradually
build familiarity with key WebDriver functions.

get()
Write a script to open a website using driver.get(). Use a website like Google or a practice
site.

navigate().to()
Navigate to a URL using driver.navigate().to() instead of get(). Open any two websites in
sequence and understand the difference.

navigate().refresh()
Open a website and refresh it using driver.navigate().refresh(). Observe how the page
reloads.

navigate().back()
Open two different websites using navigate().to(). Then navigate back to the first website
using driver.navigate().back().

navigate().forward()
After navigating back to the first website, use driver.navigate().forward() to move forward
to the second website.

getTitle()
Open a website and retrieve the title of the page using driver.getTitle(). Print the title to the
console.

getCurrentUrl()
After opening a website, retrieve and print the current URL using driver.getCurrentUrl().
getPageSource()
Open a website and print a small portion of the page source using driver.getPageSource().

findElement()
Open a website, locate an element using findElement() (e.g., search bar on Google), and
interact with it (e.g., send keys).

findElements()
Open a website and use findElements() to find a list of elements (e.g., all the links on the
page). Print the count.

manage().window().maximize()
Open a website and maximize the browser window using
driver.manage().window().maximize().

manage().window().setSize()
Open a website and resize the browser window to a custom size using
driver.manage().window().setSize().

manage().deleteAllCookies()
Open a website, delete all cookies using driver.manage().deleteAllCookies(), and verify by
checking cookies before and after deletion.

quit()
Open a browser session, interact with a website, and close all browser windows using
driver.quit().

close()
Open a website and close the current browser window using driver.close() without quitting
the WebDriver session.

You might also like