Answers for "page object"

0

page object

const Page = require('../pageobjects/mainpage.js');

/**
 * sub page containing specific selectors and methods for a specific page
 */
class mainPage  {
    /**
     * define selectors using getter methods
     */
    get GuidButton () {
        return $('li a[href="/docs/gettingstarted.html"]');
    };
/**
     * a method to encapsule automation code to interact with the page
     * 
     */
  
    async clickGuidButton () {
                await this.GuidButton.click();
    };

    /**
     * overwrite specific options to adapt it to page object
     */
}

module.exports = new mainPage();
Posted by: Guest on April-21-2022

Code answers related to "page object"

Code answers related to "Javascript"

Browse Popular Code Answers by Language