tags:

views:

167

answers:

1

I'm planning on writing some test scripts for a J2EE app using Selenium. The PageObject pattern sounds pretty good as it allows a clean seperation between test logic and implementation. How can I maintain the identifiers for each UI element in the app, coding them within the PageObject doesn't sound too good. Creating a repository of all the UI elements and their identifiers - whether it be id,xpath or other - within the app sounds nice, what would be best way to do it?

+2  A: 

Tellurium seems to be a good fit for your need.

It allows you to define logical page components, such as:

ui.Container(uid: "GoogleSearchModule", clocator: [tag: "td"], group: "true"){
 InputBox(uid: "Input", clocator: [title: "Google Search"])
 SubmitButton(uid: "Search", clocator: [name: "btnG", value: "Google Search"])
 SubmitButton(uid: "ImFeelingLucky", clocator: [value: "I'm Feeling Lucky"])
}

And then reference them throughout your tests.

Robert Munteanu
Sounds interesting. Looking forward to a .NET version
Igor Brejc