title: Use the value of a variable in another file
body: <p>Currently I am using protractor and using page object, so there is a file that I get the value of an element in a variable, but I need to call this value in another file.</p>
  
  <p><strong>vehiclePage.js</strong></p>
  
  <pre><code>/*jshint esversion: 6 */
  
  var basePage = require('./basePage.js');
  var homePage = require('./homePage.js');
  
  var VehiclePage = function() {
  
      this.storeVehicleData = function() {
  
          this.pessengersRuntValue = element(by.id('preview_ocupantes_runt')).getText();
      };
  };
  
  VehiclePage.prototype = basePage; // extend basePage...
  
  module.exports = new VehiclePage();
  </code></pre>
  
  <p>Now I need to use the value of the above variables in another file</p>
  
  <p><strong>checkoutPage.js</strong></p>
  
  <pre><code>/*jshint esversion: 6 */
  
  var basePage = require('./basePage.js');
  var homePage = require('./homePage.js');
  
  var CheckoutPage = function() {
  
      this.getRuntValue = element(by.css('.mb10'));
  
      this.compareValues = function() {
  
          expect(this.getRuntValue.getText()).toContain(this.pessengersRuntValue);
      };
  
  };
  
  CheckoutPage.prototype = basePage; // extend basePage...
  
  module.exports = new CheckoutPage();
  </code></pre>
  
  <p><strong>How can I make it work?</strong></p>