-
-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change webdriver.driver serenity property while run time #1289
Comments
No: environment variables are immutable, they are not meant to be changed this way. You can run a single test using multiple browsers using Screenplay. |
@wakaleo why it's not possible to change them? |
It would be useful to be able to override this. We have user stories where application behavior changes based on the browser the user is in. For example popping up a modal if the user is in IE. If browser is specified in the Scenario, we should be able to set the webdriver property in a scenario step, otherwise there's no guarantee the Scenario is running with the correct webdriver. |
+1, my tests are starting up docker containers which I dont know the port it gets assigned at runtime. |
In my project, I am looking for to set one property(manual like one global variable) which value I want to set in run time also should be override that property. Will it possible? |
Just use a threadlocal variable. Environment variables are shared by all tests and therefore are immutable by design. |
Ok. Thanks for instant reply. |
I am trying to run test cases on both browser & mobile sequentially , so when my mobile test cases are triggered. I am trying to change webdriver.driver property during runtime, by using
environmentvariables.setproperty("webdriver","appium"). But this is ignored and tests try to run on chrome browser which is already set in serenity.prop file
My question is :Can I change the serenity.prop values during runtime , if yes? then how?
and what is the significance of environmentvariables.setproperty("webdriver","appium") ?
The text was updated successfully, but these errors were encountered: