您好我正在尝试通过范围报告创建报告;该代码没有给出错误并成功运行,但没有生成 html 报告。任何人都可以请帮助下面是我的代码 -
package ca.automation.com;
import org.testng.annotations.Test;
import com.relevantcodes.extentreports.ExtentReports;
import com.relevantcodes.extentreports.ExtentTest;
import org.testng.annotations.BeforeTest;
import org.junit.Assert;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.testng.annotations.AfterClass;
public class ExtentReport {
WebDriver driver;
ExtentReports extent;
ExtentTest test;
@BeforeTest
public void startReport(){
extent = new ExtentReports("C:\\Report.html", true);
}
@Test
public void installapp() {
test = extent.startTest("installapp");
System.setProperty("webdriver.ie.driver", "C:\\Anuj\\Downloads\\IEDriverServer_Win32_2.46.0\\IEDriverServer.exe");
driver = new InternetExplorerDriver();
driver.manage().window().maximize();
driver.get("https://www.tripadvisor.com/");
String Title = driver.getTitle();
Assert.assertTrue(Title.contains("Trip"));
extent.endTest(test);
}
}