Selenium Assignment – 1

Here is the first assignment of this series of real-time scenarios, to practice Selenium from QA Tech hub. This assignment mainly focuses on how to invoke the Firefox browser, maximizing the window, navigate commands, etc.

This assignment is not considering proper framework development. Once you are good with frameworks, try this again considering framework.

Note: If you are very new to selenium, go through Environment setup for Selenium WebDriver and other articles before starting.


  1. Open the Firefox browser.
  2. Maximize the browser window.
  3. Navigate to “”.
  4. Write a method to print PASS if the title of the page matches with “QA Automation Tools Trainings and Tutorials | QA Tech Hub” else FAIL. (If you are familiar with TestNG or JUnit use assert statement like assert.assertequals(actual, expected) to give a verdict of the pass or fail status.
  5. Navigate to the Facebook page (
  6. Navigate back to the QA Tech Hub website.
  7. Print the URL of the current page.
  8. Navigate forward.
  9. Reload the page.
  10. Close the Browser.

Try this code. Send us the code for feedback and assessment, or if you have any questions, queries or comments. Feel free to write us Keep Learning 🙂

Here is the link to the Second Assignment.

Below code you can refer if you are a beginner:

In case you are familiar with TestNG or JUnit use below code:


Saurabh Dhingra

About the Author

Saurabh Dhingra

Follow Saurabh Dhingra: