Reputation: 1
I have problem with saving user name and password. After registration, user get username and password on the registration page. I want to store this username and password as variable and later to use it. This works fine with store text and javascript in Selenium IDE, but this do not work in WebDriver using Java. Any idea?
Upvotes: 0
Views: 1073
Reputation: 5106
Is that what you mean?
import static org.junit.Assert.*;
import org.junit.Test;
public class AbcTest {
static String aString = "";
@Test
public void test1() {
aString = "abc";
}
@Test
public void test2() {
assertTrue(aString.equals("abc"));
}
}
Upvotes: 1