title: Webdriverio: including common elements between multiple page objects
body: <p>Using webdriver-io's suggested page object pattern, what's the best way to include a module containing elements common to multiple pages, eg. a search box, or nav bar?</p>
  
  <p>For example...</p>
  
  <p>myPage</p>
  
  <pre><code>var basePage = require('./basePage');
  var searchModule = require('./searchModule');
  
  var myPage = Object.create(basePage, {
      search: { value: Object.create(this, searchModule) },
      ...
  </code></pre>
  
  <p>searchModule</p>
  
  <pre><code>var searchModule = {
      searchBox: { get: function() { return browser.element('input#s'); }},
  
      searchFor: { value: function(searchText) {
          this.searchBox.setValue(searchText);
          browser.keys('Enter');
      }}
  </code></pre>
  
  <p>This works, and allows usage like: <code>myPage.search.searchFor('some text');</code> but is this the best (or even a good) way to do this? </p>