each Platform Automation Tools Calabash droid Calabash iOS Watir Different UI actions touch click Locators Navigation Patterns Nav Drawer Menu Bar Tab Bar
each Platform Automation Tools Calabash droid Calabash iOS Watir Different UI actions touch click Locators Navigation Patterns Nav Drawer Menu Bar Tab Bar
Element.new({ :web => ‘#save_and_continue_button’, :ios => "navigationButton marked:'DONE'", :droid => "* marked:'Done'" } Element Id: Map click () 19 def click case platform when ANDROID touch(query(locator)) when IOS touch(query(locator)) when WEB Browser.element(:css => locator).click() end end
each Platform Automation Tools Calabash droid Calabash iOS Watir Different UI actions touch click Locators Navigation Patterns Nav Drawer Menu Bar Tab Bar
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. 25
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.
false, false begin wait_for_element(timeout: 30) do found_next_page = next_pages.any? { |page| page.current_page?} has_error = error_page.has_error? if error_page found_next_page or has_error end has_error ? error_page : next_pages.find { |page| page.current_page?} rescue WaitTimeoutError raise WaitTimeoutError, "None of the next page transitions were found.” end end
execution. ‣ Page registry, can be queried for page object instances. ‣ PageRegistry.get "Login Page” ‣ Rspec Unit Tests ‣ Rake task to create new page classes. 36