How to make Nightwatch use xpath by default in page object files
<p>All my page objects look something like this:</p>

<pre><code>  elements: {
      header: {
         locateStrategy: 'xpath',
         selector: "//h3[text()='Welcome']"
      },
      loginButton: {
         locateStrategy: 'xpath',
         selector: "//button[text()='Login']"
      },
      forgotPasswordLink: {
         locateStrategy: 'xpath',
         selector: "//a[text()='Forgot Password?']"
      },
      signupButton: {
         locateStrategy: 'xpath',
         selector: "//button[text()='Signup']"
      }
</code></pre>

<p>It would be way better if I could just say "use xpath everywhere"  - that would all collapse mightily</p>

<p><a href="http://nightwatchjs.org/guide" rel="noreferrer">The docs</a> say that you should be able to set <code>"use_xpath" : true</code> in your "test settings", but I have tried that in all the places I can see in nightwatch.json, and it doesn't have any effect.  </p>

<p>(It's not completely clear if they mean that this setting will affect declarations in page object files, in any case: the example only shows it affecting subequent assert calls in the test case).</p>