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 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.

Scenario:

  1.  Open Firefox browser.
  2. Maximize the browser window.
  3. Navigate to “http://qatechhub.com”.
  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 pass or fail.
  5. Navigate to Facebook page (https://www.facebook.com)
  6. Navigate back to 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 support@qatechhub.comWe will be back soon with next assignment.

Till then, Keep Learning 🙂

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:

Leave a Comment: