设定:
项目文件夹结构:
MyProject_V1 --src --src>配置 --src>卷筒纸 --src>网络> SampleTest_testng.java MyProject_V1图片:my project file structure
+++++++++++++++++++++++++++++++++++++
SampleTest.java:
@Title("Customer Service Header Test")
public class SampleTest_testng {
static WebDriver wd;
static ReusableMethods global_method = new ReusableMethods();
@Stories("Customer Service")
@BeforeClass
public void openBrowser() {
wd = new FirefoxDriver();
}
@Test
public void getUrl() {
wd.get("http://www.mudah.my/support.htm?ca=9_s");
wd.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
@Step("Find the total number of H4 elements")
private void findElementH4() {
int total_css = wd.findElements(By.cssSelector("h4")).size();
System.out.println(total_css + "\n");
}
@Step("Get the text for the first H4 element")
private void findFirstH4Element() {
System.out.println(wd.findElements(By.cssSelector("h4")).get(0).getText());
}
@Step("Get the text for the second H4 element")
private void findSecondH4Element() {
System.out.println(wd.findElements(By.cssSelector("h4")).get(1).getText());
}
@Step("Get the text for the third H4 element")
private void findThirdH4Element() {
System.out.println(wd.findElements(By.cssSelector("h4")).get(3).getText());
}
@AfterClass
public void closeBrowser(){
wd.close();
}
}
的问题:
说明:
我在mvn网站上收到错误:
Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project SeleniumAutomationSuite_V3: failed to get report for ru.yandex.qatools.allure:allure-maven-plugin: Plugin ru.yandex.qatools.allure:allure-maven-plugin:1.4.22 or one of its dependencies could not be resolved: Failure to find ru.yandex.qatools.allure:allure-maven-plugin:jar:1.4.22 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
有谁知道可能是什么问题?这是我的项目结构吗?我是Maven的新手,我正在尝试使用它来管理我的依赖项。我试着四处寻找有关错误的更多信息,希望它可以解释为什么诱惑根本没有运行。
谢谢!