public class Reg {
@BeforeClass
public void setUp() throws Exception
{
// Generate a unique email every time
String email= UniqueEmail.now()+"@test.com";
.....
}
@Test()
public void Reg1() throws Exception
{
// Registration Test
}
}
public class Login{
@BeforeClass
public void setUp() throws Exception
{
//How to parse in the email variable from Class Reg?
}
@Test()
public void Login() throws Exception
{
// Use the email generated from class A
selenium.type("EmailID", email)
}
}
ClassReg
は常に Class の前に実行されLogin
ます。email
Class を実行した後に変数を保存してReg
、 Class で使用できるようにするにはどうすればよいLogin
ですか?