pageobjects

Protractor Page objects - TypeError: Object #<Object> has no method &#39;methodName&#39;

I'm trying to write a simple test using page objects pattern - based on the ' docs/page-objects '. I created a file describing the page object and other using this page object to test a page. //page object var LoginPage = function() { this.userInput = browser.driver.findElement(by.id('username'));...

Selenium/PageFactory: Find child elements using parent element&#39;s @FindBy?

I'm trying to convert my selenium tests to use the Page Object Model (and, by extension, @FindBy). I have several object definitions like this: public WebElement objectParent() { return driver.findElement(By.name("parent-id")) ; } public WebElement objectChild() { WebElement elem = objectParent();...

Running multiple browser instances in the same test spec

If I have a single spec that is using page object model, how do I run multiple browser instance for that same spec? For example I have spec: it('should run multi browser', function() { browser.get('http://example.com/searchPage'); var b2 = browser.forkNewDriverInstance(); b2.get('http://example.com...

Using Data Objects while E2E testing with Protractor

So a coworker and I were discussing making a data object for our e2e tests. From my understanding about data objects they are used for decoupling your test suites. For example, my first test suite is to create an account and to test if the fields are valid and the second test suite logins into the...

NightWatch.js - get a list of child WebElements based on relative css locator

Hello all NightWatch adopters, I am trying to parse a table with the following format to get a a list of rows and the cell in each rows <tbody> <tr> // 1 row <td>Item A</td> // name <td>John</td> // owner <td>Monday</td> // create date </tr> <tr> // 2 row <td>Item B</td> <td>Mary</td> <td>Tuesday<...

Is JavaScript compatible with strict Page Object Pattern?

I have built various Test Automation frameworks using the Page Object Pattern with Java ( https://code.google.com/p/selenium/wiki/PageObjects ). Two of the big benefits I have found are: 1) You can see what methods are available when you have an instance of a page (e.g. typing homepage. will show me...

PageObjects + non-angular page - how to join them?

I'm writing some protractor tests for our application. There is one place where is non-angular page as iframe in angular page. Problem: I'm unable to map fields from non-angular page in Page Object object and use them in right time in my test specs. Notes: I tried write Page Object as object (var...

Implementing PageObjects pattern for frames in a page

How to implement the pageObject pattern(Selenium) for frames in a page..I have a home page and there is a left frame and Right frame and i would like to create page object for each frame.. For example, I have the LeftFrame Page Object as below: Public Class HomePageLeftFrame{ private WebElement link...

when do FindBy attributes trigger a driver.FindElement?

My question is: do webelements decorated with findby attributes call the findelement function upon each reference to them? If not, when? And what is the procedure with List< webelement > which is also decorated? Does it trigger when you reference the list, or when you reference an element inside...