DETAILED READ SECTION

Selenium Coding Exercises

Helps QA to walk through sample selenium coding exercise which will be helpful both for interviews preparation and working as Automation QA to use shared code in live projects.



Exercise 1:

Write a script to open google.com and verify that title is Google and also verify that it is redirected to google.co.in



Exercise 2:

Write a script to open google.co.in using chrome browser (ChromeDriver)

Exercise 3:

Write a script to open google.co.in using internet explorer (InternetExplorerDriver)


Exercise 4:

Write a script to create browser instance based on browser name


Exercise 5:

Write script to login Next Generation Automation

Exercise 6:

Write a script to search for specified option in the listbox


Exercise 7:

Write a script to print the content of list in sorted order.


Exercise 8:

Write a script to print all the options.For duplicates add entry only once.

Hint: Use HashSet



Exercise 9:

Write a script to close all the browsers without using quit() method.

Exercise 10:

Write generic method in selenium to handle all locators and return web element for any locator.


Exercise 11:

Write generic method in selenium to handle all locators containing dynamic wait and return web element for any locator.