How to create page objects with Selenium WebDriver

Everything starts with a manual test case.  Our test case is for the Vancouver Public Library site.  It tests that a search done on the site’s home page returns results.        The test case tell us what actions the user takes  1. user opens home page  2. user searches for keyword  to verify…

Correct and incorrect ways of creating page object classes

Let’s say that you want to automate test scenarios for the login page of a web site. The login page has 3 elements: – username textbox – password textbox – sign in button     Some of the test cases to be automated for this page are user can sign in with correct username and…

Do not store element locators in property files

You have a small test automation project with about 50 test scripts and 10 page object classes. Each page object class uses approximately 10 web elements. The project has around 100 web element locators. Where should the elements’ locators be stored? Should they be stored in the page object classes, in enumerations, classes with static…