You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before v0.4.1 I could access the test settings for my current environment in a test by calling the options property on the client object. This was useful when testing in different environments because I could declare custom properties and access them within my tests.
Since we use the same URL pattern for all of our environments, I added an environment property to my environment settings in settings.json (now nightwatch.json):
Now however, with v0.4.1, the options property isn't available on the client object. My current solution is to specify the environment in the launch_url property since launch_url can be accessed directly from the client object in v0.4.1. My test above changes to client.launch_url + ".site.com/login".
However, I don't like this solution because the launch_url property has a different purpose from how I'm using it now. But also because having access to the options property, and being able to specify custom options in your test settings provided an extra layer of flexibility.
Is there a way that I can access environment specific settings within tests in v0.4.1? If not, can we either get access to those settings again, or talk about other possible solutions?
The text was updated successfully, but these errors were encountered:
Before v0.4.1 I could access the test settings for my current environment in a test by calling the
options
property on theclient
object. This was useful when testing in different environments because I could declare custom properties and access them within my tests.Since we use the same URL pattern for all of our environments, I added an
environment
property to my environment settings in settings.json (now nightwatch.json):I did the same for all of our environments, so my tests looked like this for example:
Now however, with v0.4.1, the
options
property isn't available on theclient
object. My current solution is to specify the environment in thelaunch_url
property sincelaunch_url
can be accessed directly from theclient
object in v0.4.1. My test above changes toclient.launch_url + ".site.com/login"
.However, I don't like this solution because the
launch_url
property has a different purpose from how I'm using it now. But also because having access to theoptions
property, and being able to specify custom options in your test settings provided an extra layer of flexibility.Is there a way that I can access environment specific settings within tests in v0.4.1? If not, can we either get access to those settings again, or talk about other possible solutions?
The text was updated successfully, but these errors were encountered: