我有一个开发文件夹,里面有以下文件夹(项目):
开发:{baseByBase,vgo,virology-lib2}
virology-lib2中的文件与public class logoutMenu {
public static void run(WebDriver driver) {
Properties prop = new Properties();
InputStream selectproductsidebarobjectrepository;
try {
selectproductsidebarobjectrepository = new FileInputStream(
"C:/thisisthepath/ObjectRepositories/SignInPageObjectRepository");
prop.load(selectproductsidebarobjectrepository);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
WebElement logoutNormal = driver.findElement(By.xpath(prop.getProperty("log_out_normal")));
Actions actions = new Actions(driver);
actions.moveToElement(logoutNormal).build().perform();
WebElement logoutHover = driver.findElement(By.xpath(prop.getProperty("log_out_hover")));
logoutHover.click();
WebElement logoutPushed = driver.findElement(By.xpath(prop.getProperty("log_out_pushed")));
logoutPushed.click();
} catch (IOException ex) {
ex.printStackTrace();
} finally {
if (selectproductsidebarobjectrepository != null) {
try {
selectproductsidebarobjectrepository.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
vgo中的文件与package ca.virology.lib2..;
所以在我的baseByBase项目中,从病毒学-lib2导入package ca.virology.vgo..;
就可以了。
我想类似地从vgo导入类到baseByBase,但import ca.virology.lib2...;
不起作用(无法解析符号vgo)。如何将vgo类导入baseByBase?为什么它适用于一个import ca.virology.vgo..;
而不是另一个?