It is possible to use a variable to set a value using Selenium - Cucumber?
In my Class.Java : I tried to create a private variable ( private String username = "x"; )
with Setter ( public void setUsername(String username).. )
But the value doesn't change when i use setUsername from another class.
MyClass myVariable = new MyClass ();
myVariable .setUsername("myUsername");
myVariable .setPassword("myPassword");
myVariable becomes "myUsername" but When " @Before " starts, the value is "x" even if I changed it.
The value of the variable must be dynamic and non-static for the purposes of the project. Can i use Config.properties to do this ? There is a way to solve this problem?
Thank you so much.