Numerous Pulsating Martians


    1.1.4 • Public • Published

    Protractor-POM-Ready-To-Use Page Object Basic Model ( Ready To Use ) - UI Test Automation Design Pattern for Contact me! if you have more ideas -

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

    Step 1:

    • Install NodeJs
    • 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 on chrome browser

    Page code pattern in the folder => "Pages"

    class HomePage {
    constructor() {
        this.homeLink = element(by.linkText('Home'));
        this.drop1Link = element('drop1'));
        this.tutorialLink = element(by.linkText('Tutorial'));
        this.drop2Link = element('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('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 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 () {
    browser.ignoreSynchronization = true;
    browser.wait(EC.visibilityOf(homePage.homeLink), 10000);
    browser.wait(EC.visibilityOf(homePage.homeLink), 10000);   

    Used jasmine for assertion

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

    "environment": ""

    Standard protractor configuration coming from => conf.js


    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


    npm i protractor-page-object-model

    DownloadsWeekly Downloads






    Unpacked Size

    8.83 kB

    Total Files


    Last publish


    • padmaraj.nidagundi