paypal / nemo-view

View interface for the Nemo automation framework
Other
26 stars 48 forks source link

Adding a global default timeout for all wait functions. #82

Closed mengchen2 closed 2 years ago

mengchen2 commented 5 years ago

This PR is Addressing Issue #81. Adding nemo.view.defaultTimeout as a new name space for Nemo-view.

Usage: Add global waitTimeout on config.json:

  "plugins": {
    "view": {
      "module": "nemo-view",
      "arguments": [ "path:../../node_modules/gctnightswatchnodeweb/locator", 30000]
    },

If no timeout value provided to the plugin arguments, Nemo-view will use the fallback timeout, which is 5000. Just like before

  "plugins": {
    "view": {
      "module": "nemo-view",
      "arguments": [ "path:../../node_modules/gctnightswatchnodeweb/locator"]
    },

Another way to use it, set timeout for the case: nemo.view.defaultTimeout = 60000;

grawk commented 5 years ago

Thanks @mengchen2 .. I had started working on this over the weekend but it's only a local working copy. It differs from yours in terms of passing the timeout value as a parameter to the "locreator" class. I would recommend that approach.