npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

protractor-page-object-model

v1.1.4

Published

Page Object Basic Model ( Ready To Use ) - UI Test Automation Design Pattern for protractortest.org

Downloads

19

Readme

Protractor-POM-Ready-To-Use Page Object Basic Model ( Ready To Use ) - UI Test Automation Design Pattern for protractortest.org Contact me! if you have more ideas - [email protected]

  • https://github.com/padmarajnidagundi
  • https://www.npmjs.com/package/padmaraj
  • https://www.linkedin.com/in/padmarajn/

How To Run ==> How To Use Page Object Design Pattern Basic Model ( Ready To Use )

Step 1:

  • Install NodeJs https://nodejs.org/en/download/
  • Make dir called "POM" in C:\ drive - Get into the folder
  • Install Protractor globally with command: npm install -g protractor
  • Update web driver with command - webdriver-manager update
  • Start the command webdriver-manager start then open this local URL http://localhost:4444/wd/hub in browser to make sure protractor up and running

Step 2:

Finally, :-)

Step 3:

  • In another consol run the command => protractor conf.js
  • Your will notice test are running against the protractortest.org on chrome browser

Page code pattern in the folder => "Pages"

class HomePage {
constructor() {
    this.homeLink = element(by.linkText('Home'));
    this.drop1Link = element(by.id('drop1'));
    this.tutorialLink = element(by.linkText('Tutorial'));
    this.drop2Link = element(by.id('drop2'));
    this.settingUpProtractorLink = element(by.linkText('Setting Up Protractor'));
    this.settingUpTheSeleniumServerLink = element(by.linkText('Setting Up the Selenium Server'));
    this.settingUpTheBrowserLink = element(by.linkText('Setting Up the Browser'));
    this.choosingAFrameworkLink = element(by.linkText('Choosing a Framework'));
    this.drop3Link = element(by.id('drop3'));
    this.fAQLink = element(by.linkText('FAQ'));
}
}
module.exports = new HomePage();

Test case code pattern in the folder => Tests

var homePage = require('../Pages/homePage');
var testdata = require('../Testdata/data.json');
const EC = protractor.ExpectedConditions;
describe('Check the https://www.protractortest.org/ main page Home and Tutorial links', function () {
it('HomePageTest 1 .1 - It should navigate to home page! check Tutorial page and go back to Home page', function () {
//Given
browser.ignoreSynchronization = true;
browser.driver.manage().window().maximize();
browser.get(testdata.environment);
browser.sleep(6000);
//When
homePage.tutorialLink.click();
browser.wait(EC.visibilityOf(homePage.homeLink), 10000);
//Then
homePage.homeLink.click();
browser.wait(EC.visibilityOf(homePage.homeLink), 10000);   
}); 
});

Used jasmine for assertion https://jasmine.github.io/

Test data is isolated from the test case in the folder => Testdata using JSON file.

{ 
"environment": "https://www.protractortest.org/"
}

Standard protractor configuration coming from => conf.js

Keywords

Software testing, Test automation, UI test automation, Qualiy assurance, Test automation framework, Test automation framework architecture, Test automation framework design, Page object model, UAT testing, E2E testing, Angular testing, AngularJS testing, Jasmine, Automation

maintaining codebase tips Kudos (Help) for you

  • To update your Protractor version ::: npm install protractor@latest --save & npm install -g protractor
  • Selenium Web driver update ::: webdriver-manager update