This is my story about my initiative to introducing Best-Practice (like PageObject pattern) into existing AutoTest codebase writen on C# using Telerik. I've show the code-refactoring process with code-examples.
16. Static vs Instance
//Instance + var
var main = LoginPage.Login();
var tasks = main.MainMenu.TasksAndWorkflows.Tasks();
var bulk = tasks.Grid.OpenContextMenu(0, 1)
.EditTaskPropertiesInBulk();
bulk.AddNewSchedule();
var confirm = bulk.Save();
tasks = confirm.Confirm();
Assert.IsTrue(tasks.Grid.Rows[0].IsNotSimpleTask);
18. Summary
• No hesitate small (or no dev.) projects – talk ,
suggest, review
• Accept challenges in new areas
• AutoTests
– Split them on Tests and API
– PageObject is very effective
19. Links
• DSL, Page Object и Selenium – path to stable functional
tests. Part1
• DSL, Page Object и Selenium – path to stable functional
tests. Part2
• http://code.google.com/p/selenium/wiki/PageObjects
• http://martinfowler.com/bliki/PageObject.html
• http://www.ralphlavelle.net/2012/08/the-page-object-pattern-
for-ui-tests.html
• http://docs.seleniumhq.org/docs/06_test_design_cons
iderations.jsp#chapter06-reference
• http://sqa.stackexchange.com/