node.js - nightwatch - find current page object -
is there way find current page object within custom command.
i call getelementcount(), while page pageobejct1 instantiated.
    browser.page.pageobejct1()       .getelementcount('@clicktoselectlist', function (count) {        //some code        }   the custom command on other hand tries find out current locatestrategy.
        module.exports.command = function (tag, callback) {           //here distinction between pageobejct1 , pageobejct2           var selector = this.page.pageobejct2(tag);           var locatestrategy =  selector.locatestrategy;           //some code again.         };   anyway, issue page pageobejct1 , page pageobejct2 represent 2 different page objects. therefore, have generic solution. interface in oop.
would possible? or possible current page object nightwatch somehow?
thanks!
 
 
Comments
Post a Comment