Automate Browser Actions and Menu links with Selenium Webdriver

This post contains two assignments which helps you to learn selenium  browser commands. These are the simplest assignments. So, this assignment post is the best suited to start your automation tester journey.

1. Automate Browser Actions on GoDaddy.com with Selenium

If you are a beginner in automation testing and looking forward to write your first Selenium code, then this post is the best destination for you. This assignment will teach you the basic commands of Selenium Webdriver to perform basic actions like., Launch browser, maximize browser window, validate page title and close browser.

In this post, you will find very basic step by step assignments which will upgrade your understanding about Selenium Webdriver and it's commands.

Assignment Level - Beginner

Test Case 1 - Open Godaddy.com and maximize browser window.
Steps to Automate:
1. Launch browser of your choice say., Firefox, chrome etc.
2. Open this URL - https://www.godaddy.com/
3. Maximize or set size of browser window.
4. Close browser.

Test Case 2 - Open Godaddy.com and Print it's Page title.
Steps to Automate:
1. Launch browser of your choice say., Firefox, chrome etc.
2. Open this URL - https://www.godaddy.com/
3. Maximize or set size of browser window.
4. Get Title of page and print it.
4. Get URL of current page and print it.
5. Close browser.

Now is the time to automate a consolidated and final assignment.

Test Case 3 - Open Godaddy.com and Validate Page Title
Steps to Automate:
1. Launch browser of your choice say., Firefox, chrome etc.
2. Open this URL - https://www.godaddy.com/
3. Maximize or set size of browser window.
4. Get Title of page and validate it with expected value.
5. Get URL of current page and validate it with expected value.
6. Get Page source of web page.
7. And Validate that page title is present in page source.
8. Close browser.

Try writing program for above assignments and execute. If  you find any difficulty in writing code for above assignments, you can refer following link for help:

2. Automate Amazon Website Menu links with Selenium

This assignment helps you learn those Selenium commands which are useful in clicking on links and navigate to different pages. It is the most usual thing testers do. By automating this assignment, you will verify that, clicking on menu links landing users on correct web pages. I am assuming that you have already gone through Assignment 1 and aware of basic commands of Selenium. Try to automate all the 3 test cases shared in this post, the more you practice more you get confidence.

Assignment Level - Beginner

Test Case 1 - Automate first Menu link of amazon.in and print page title
Steps to Automate:
1. Launch browser of your choice say., firefox, chrome etc.
2. Open this URL -  www.amazon.in
3. Maximize or set size of browser window.
4. Get the page title and print it.
5. Now, click on first menu link say 'Amazon Pay' (or choose any other link from the menu list)
6. Get the page title and print it.
7. Navigate back to Home Page.
8. Get the page title and print it. Verify that value matches with output of point no. 4
9. Close the browser.

Test Case 2 - Automate all the Menu links of techlistic.com
Steps to Automate:
1. Launch browser of your choice say., firefox, chrome etc.
2. Open this URL -  https://www.techlistic.com/
3. Maximize or set size of browser window.
4. Click on 'Java Tutorial' link and validate page title.
5. Navigate back to Home Page.
6. Click on 'Selenium Tutorial' link and validate page title.
7. Navigate back to Home Page.
8. Click on 'Selenium Blogs' link and validate page title.
9. Navigate back to Home Page.
10. Click on 'TestNG Blogs' link and validate page title.
11. Close the browser.

Test Case 3 - Automate all the Menu links of amazon.in and Verify page titles
Steps to Automate:
1. Launch browser of your choice say., firefox, chrome etc.
2. Open this URL -  www.amazon.in
3. Maximize or set size of browser window.
4. Get the page title and print it.
5. Click on first menu link, say 'Amazon Pay'.
6. Get Page title and verify it with expected value.
7. Navigate back to Home Page. 
8. Get Page title and verify it with expected value.
9. Repeat steps 5 to 8 for other menu links.
10. Close the browser.

If you need any help to automate above assignments, then check the reference links: 
Next  >> Assignment 2 - Automate Selenium Practice "About Me" Form

Follow Us

Quora Space | Facebook Page | Telegram Channel
Feel free to ask queries or share your thoughts in comments or email us.

Comments

Popular posts from this blog

10 Best Demo Websites for Selenium Automation Testing Practice

Automate an e-Commerce website with Selenium Webdriver

How to Handle Dynamic Web Table in Selenium WebDriver

Top 50 Selenium Webdriver Interview Questions

Top 25 Selenium Webdriver Commands for Test Automation