public void setup() {
initialization();
SigninPage signinPage = new SigninPage();
}
Here, you are assigning a SiginPage object to a singinPage local variable. This object is eligible to be destroyed as soon as the method ends.
What you probably want to do is to assign this object to an attribute.
this.signinPage = new SigninPage();
Attributes last as long as the object which holds them exists.
TestNG will instantiate a SigninPageTest object, call each one of the @Test methods, along with the hooks @Before/@After and only after the tests destroy the SigninPageTest object.
- List item