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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -