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
0 answers

Retrieving a given pricelist from a PageObject in Selenium Webdriver

I am learning Java to support my Webdriver skills and need to know the best practice for calling different pricelists against which to assert, using the PageObject model. I have an AUT for which the pricelist will change bi-annually. So, I don't…
Steerpike
  • 1,712
  • 6
  • 38
  • 71
0
votes
2 answers

Is Page Object Pattern suitable for Windows Application

I have read that Page Object Pattern is suitable for the Web Application Automation and I have used the Page object pattern with Selenium for one of the Web Apps I have automated. How ever I am curious to know is Page Object suitable to…
0
votes
0 answers

What am I missing to define a variable from a page object? Getting undefined error in watir-webdriver

I'm trying to create a page object for the forms I'm automating and getting undefined local variable or method for 'checkout_form', though I thought I've already defined the variable. This is my page object page: require "page-object" class…
0
votes
1 answer

How to parameterise nunit webdriver tests?

I'm writing WebDriver NUnit tests using the WebDriver Page.Factory/Page object model. My problem is that my test must run on many variants that are subtly different. For obvious reasons I don't want to have to maintain 15 versions of the same…
CynicalBiker
  • 579
  • 5
  • 14
0
votes
1 answer

Handling assertions for large numbers of WebElements using Webdriver Page Object Model

I have a page that contains 50 odd WebElements that I'd like to assert have the correct text. I am using Page Objects so the Test is seperate from the object and the Test is where the assertions must live. I don't want to have 50 seperate @Test's…
Steerpike
  • 1,712
  • 6
  • 38
  • 71
0
votes
2 answers

Need Help on Page Object Model Implementation

I am in a process of implementing Page object Model, I have one query regarding it, please see below: I have created page files which is having locators and methods for the page, I have spec file in which I am doing the assertions by calling these…
user3121600
  • 131
  • 3
  • 8
0
votes
1 answer

Selenium: How to use ByChained Class in C#?

I have two questions Selenium: How to use ByChained Class in C#? is there a way to give multiple identification property like class and innertext to identify an element in pageobject and pagefactory model?
deepakguna
  • 145
  • 3
  • 16
0
votes
1 answer

Is it possible to identify an element only knowing part of its name?

I'm trying to identify
elements with ids that are dynamically generated. I want to be able to grab the element using the text identifier. I don't want to have to know what the exact name is. For example, if there was a div tag containing…
Adam6806
  • 87
  • 10
0
votes
1 answer

Page object Class got more methods

I have written Page object class for Login page to test UI look & feel for web, iphone & tablet. For each verification I have written a method to return cssValue or text for that element. Writing that increases lot method defined in a single…
KingArasan
  • 733
  • 1
  • 10
  • 19
0
votes
1 answer

Using Codeception what do I use for a Page Object when testing REST APIs

I'm using Codeception to create api tests for some REST API's. I'm finding that the Page Objects are really helpful in writing my tests but should I be using another Codeception object? For example, I'm putting User information (first name, last…
Clutch
  • 7,404
  • 11
  • 45
  • 56
0
votes
1 answer

How to extract text from tag using Selenium pageobject?

How to extract text from tag using Selenium pageobject? This is the html code:
Reply from:
chen layton
  • 61
  • 1
  • 7
0
votes
1 answer

When to Stop Defining FindBy's in the Object and Move Them to the Test

So I have an interesting conundrum I was curious to get some feedback from other Webdriver framework architects. Currently I follow a pretty standard execution model: baseobject pageobject (extends baseobject) Junit testobject (references one or…
0
votes
2 answers

How can I get some particular link form the links collection

I'm using watir-webdriver have several lines of the same code shown below: ...

by MarketingClub in Marketing

Annet
  • 673
  • 1
  • 7
  • 17
0
votes
2 answers

Selenium findElement in the another findElement

For example, I have an element1 which I can find after I find element2, like this: driver.findElement(By.xpath("//xpath2")).findElement(By.xpath("//xpath1")).click(); I want to use PageObjectModel and annotations @FindBy, like these: @FindBy(xpath…
nzaroma
  • 100
  • 8
0
votes
1 answer

How can we get all element values, when more than element hold same class name

How can we get all element values, when more than element hold same class name. Eg: Consider I'm having n number of elements that having same class name as follows Country 1 Country…
KAK
  • 905
  • 4
  • 14
  • 33