Questions tagged [pageobjects]

A design pattern to represent a web page as an object. Usually used in UI / end-to-end testing and browser automation.

A page object provides access to a web page. In its implementation, a page object typically makes use of a web driver like or . The page object hides the html and web driver details, and provides an abstract interface to the page in terms of its application domain.

The page objects are subsequently used to create end-to-end test scenarios that click through the application. The use of page objects make these tests easier to maintain when details of the underlying pages change.

This tag can be used for questions on the design, implementation, and use of page objects for end-to-end testing of web applications.

More information:

845 questions
0
votes
1 answer

How to reuse selenium page objects for business feature

We build model for each page with selenium page objects pattern. But for implementing one business feature, it will involve couple of pages. For example, creating one user, it involves AgreementPage and CreateUserPage like below agreementPage =…
Cypine
  • 310
  • 3
  • 13
0
votes
1 answer

Make an assertion that error text is correct

When testing website login without credentials we're getting a tooltip message that email and password should be entered. I need to make an assertion that the text of the error is relevant when we try to login without any credentials.…
Showme
  • 69
  • 1
  • 3
  • 8
0
votes
1 answer

Accessing to JS-widget from module

I try to access to custom JS-widget from my module. Base page class just include PageObject, DataMagic and RSpec::Matchers. My class require_all 'lib/pages/billing/billing_form_panel.rb' class RealtyCpBillingPage < BasePage include…
mef_
  • 478
  • 1
  • 12
  • 31
0
votes
1 answer

How-To on implementing Page Object Model with Telerik Test Studio

I am evaluating Telerik Test Studio (http://www.telerik.com/automated-testing-tools) as a web regression tool and looking for a how-to on setting up and using of a Page Object Model environment like is possible in Selenium. …
Fazle Khan
  • 55
  • 6
0
votes
1 answer

Converting my existing code to PageObject design pattern with PageFactory

I'm creating tests using Selenium 2 Web Driver with C#.Net. After reading through a lot of the Selenium documentation, I am not sure if I'm followign the correct design pattern and feeling unsure on how to go about testing using PageObject design…
Nick Kahn
  • 19,652
  • 91
  • 275
  • 406
0
votes
1 answer

Design Pattern/ OOP : How to split operation into classes

I am working in python Page Object for automation. I have a basePageObject(ChangePasswordPage) and it has 4 other child pages which differs by the by the fields on the page. All these change password page runs on the same URL but they differs with…
prabeen giri
  • 803
  • 7
  • 18
0
votes
1 answer

Using Test::Unit in an abstraction layer

Is there a way to call assertions from inside an object? I am writing Selenium tests and using test unit for assertions and easy reporting. I have an abstraction layer between the top level test ( class that extends Test::Unit::TestCase) and…
Zach
  • 885
  • 2
  • 8
  • 27
0
votes
1 answer

How can i implement Webdriver / PageObjects / Pagefactory in Java in a way that can be generally applied

Here is my attempted implementation understanding of PageObjects/Pagefactory as applied to Webdriver: 1. Create the following structure in eclipse --> com.example.qa.pageobjects --> LoginPage.java Every class in this package has something…
kamal
  • 9,637
  • 30
  • 101
  • 168
0
votes
1 answer

Webdriver Error "Driver info: driver.version: unknown"

I am trying to run the example from Page-Objects Example and it runs fine on Windows 7, but when i try to run it on Linux ( Fedora 15 ) I get an error: GitHubLoginTest…
kamal
  • 9,637
  • 30
  • 101
  • 168
0
votes
2 answers

Could an object reinitialize itself before a method is executed?

Can I have an object reinitialize itself before a method is executed? I'm using Ruby and selenium to test a web app and I am trying to improve my page objects. for example class Foo def initialize #stuff happens here end def…
Zach
  • 885
  • 2
  • 8
  • 27
0
votes
1 answer

Webdriver PageObject Implementation using PageFactory in Java

here is what i have so far: A working Webdriver based Java class, which logs-in to the application and goes to a Home page: import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; import…
kamal
  • 9,637
  • 30
  • 101
  • 168
0
votes
1 answer

What are the benefits of returning new page object in page object pattern?

For example, if I were to test Google search, what is the benefit of the Page Object model returning new Google Search Page Object? E.g. public class SearchPage { private final WebDriver driver; public SearchPage(WebDriver driver) { …
Student01
  • 109
  • 3
  • 11
0
votes
1 answer

Passing Exception Information from Global.asax to ErrorPage.aspx

I have a global error handler in Global.asax and am trying to display the exception information in a page called ErrorPage.aspx. I've read Microsoft's page about passing information between asp.net pages…
Emily
  • 444
  • 1
  • 3
  • 12
0
votes
1 answer

Locate only non-hidden elements using Selenium WebDriver in C#

I have a collection of records on a web page, and when a record is clicked, a 'Delete' link is displayed (actually 'unhidden' as its actually always there). When trying to access this 'Delete' link, I am using its value. When I use…
Alister Scott
  • 3,675
  • 24
  • 41
0
votes
2 answers

Whats the best way to initialize and use a WebDriver PageObject using PageFactory?

With WebDriver and PageFactory, using Java we are implementing a new automation project, and we've been experimenting with various ways of having PageObjects created. We're torn on a few different ideas, and want to make sure we don't work…