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

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -