Practices by calabash http://bit.do/github_calabash_automation_practice 1. Different pages for ios and android 2. Each page will implement respective contract for given platform 3. Conditional loading of pages
Id : PageId Elements Element.new({ :web => ‘#save_and_continue_button’, :ios => "navigationButton marked:'DONE'", :droid => "* marked:'Done'" } Element Id: Map click() def click case platform when ANDROID touch(query(locator)) when IOS touch(query(locator)) when WEB Browser.element(:css => locator).click() end end
should be responsible only for UI interaction. ๏ Driver should not know about higher level abstraction Page. 2. element.click ๏ It will not be applicable to all elements. 3. Transition Aware Element ➡ An element that understands page transitions.
a bug in code, app transitions to wrong page from list of multiple transitions. ➡ Tests should take care for assertions of correct page, not the framework.