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
Scenario: Make sure the account is in online mode Given Adam needs to login to the demo page When he enables online mode Then he sees tests the demo logo
Is there a way to launch the browser with the appropriate URL? Maybe using the @before tag Or is there another simpler way?
I also understand that we can use command line mvn verify -Denvironment=staging, however is there another way without the use of command line? Mainly when I try to run a single scenario using right-click on a Scenario -> Run 'Scenario: Make sure the account is in online mode'
Tried the below code
Before(value = "@Stag")
@Given("^I am setting the environment$")
public void setTheEnvironment()
{
EnvironmentVariables env = SystemEnvironmentVariables.currentEnvironmentVariables();
String baseUrl = EnvironmentSpecificConfiguration.from(env).getProperty("environments.staging.webdriver.base.url");
env.setProperty("webdriver.base.url", baseUrl)
}
The above was not meant to work as I later found out that environment variables are ready only.
There also are potential solutions like create a custom property file like project.properties and use it map using JAVA code. But I just want to avoid the coding and understand if there is a direct way to relate @stag to environments.staging.webdriver.base.url
The text was updated successfully, but these errors were encountered:
Why don't you just add a line at the top of your serenity.conf and modify it depending on what environment you want to execute your tests on in IntelliJ:
I have a feature file:
@stag Feature: This is just a demo
Scenario: Make sure the account is in online mode Given Adam needs to login to the demo page When he enables online mode Then he sees tests the demo logo
My serenity.conf file:
Is there a way to launch the browser with the appropriate URL? Maybe using the @before tag Or is there another simpler way?
I also understand that we can use command line mvn verify -Denvironment=staging, however is there another way without the use of command line? Mainly when I try to run a single scenario using right-click on a Scenario -> Run 'Scenario: Make sure the account is in online mode'
Tried the below code
The above was not meant to work as I later found out that environment variables are ready only.
There also are potential solutions like create a custom property file like project.properties and use it map using JAVA code. But I just want to avoid the coding and understand if there is a direct way to relate @stag to environments.staging.webdriver.base.url
The text was updated successfully, but these errors were encountered: