我想在扩展类上使用一个函数,但我不能称之为
import testCase.mainClass;
public class teamMemberValidation extends mainClass{
mainClass mClass = new mainClass;
@BeforeTest
public void beforeTest(){
String exePath = "/home/dev/chromedriver";
System.setProperty("webdriver.chrome.driver", exePath);
driver = new ChromeDriver();
driver.manage().window().maximize(); // Maximize window
timeImp(5);
driver.get("http://sample/sight");
mClass.test("Hello World");
}
@AfterTest
public void afterTest() {
//driver.close();
}
}
public class mainClass {
@BeforeTest
public void beforeTest(){
String exePath = "/home/dev/chromedriver";
System.setProperty("webdriver.chrome.driver", exePath);
driver = new ChromeDriver();
driver.manage().window().maximize(); // Maximize window
timeImp(5);
driver.get("http://sample/sight");
mClass.test("Hello World");
}
public void test(String text){
System.out.print(text);
}
@AfterTest
public void afterTest() {
//driver.close();
}
}