lundi 20 juillet 2015

Following Test Automation best practise of "Methods return other PageObjects" in Ruby

I am a big advocate of the Page Object Pattern (POP) as defined by the experts at Selenium: http://ift.tt/19A2hZK

A key view of theirs that I have always followed when using Appium with Java is: "Methods return other PageObjects"

e.g. LoginPage loginPage = homePage.gotoLoginPage();

I am now trying to following POP using Calabash with Ruby and so have been writing code like this:

e.g. @login_page = @home_page.goto_login_page

However, since Ruby doesn't know what type of object @login_page is or @home_page is, you dont get any of the benefits of intellisense showing what methods are available for a given page.

Anyone know a good way around this?

Aucun commentaire:

Enregistrer un commentaire