Java Code Examples for com.aventstack.extentreports.ExtentTest#addScreenCaptureFromPath()
The following examples show how to use
com.aventstack.extentreports.ExtentTest#addScreenCaptureFromPath() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RawEntityConverter.java From extentreports-java with Apache License 2.0 | 5 votes |
private void addMedia(Test test, ExtentTest extentTest) { if (test.getMedia() != null) { for (Media m : test.getMedia()) { if (m.getPath() != null) { extentTest.addScreenCaptureFromPath(m.getPath()); } else if (m instanceof ScreenCapture) { extentTest.addScreenCaptureFromBase64String(((ScreenCapture) m).getBase64()); } } } }
Example 2
Source File: MyExtentTestNgFormatter.java From Java-API-Test-Examples with Apache License 2.0 | 3 votes |
/** * Adds a screen shot image file to the report. This method should be used only in the * {@link org.testng.annotations.Test} annotated method * * @param filePath The image file path * @throws IOException {@link IOException} */ public void addScreenCaptureFromPath(String filePath) throws IOException { ITestResult iTestResult = Reporter.getCurrentTestResult(); Preconditions.checkState(iTestResult != null); ExtentTest test = (ExtentTest) iTestResult.getAttribute("test"); test.addScreenCaptureFromPath(filePath); }
Example 3
Source File: MyExtentTestNgFormatter.java From Java-API-Test-Examples with Apache License 2.0 | 3 votes |
/** * Adds a screen shot image file to the report. This method should be used only in the * {@link org.testng.annotations.Test} annotated method * * @param filePath The image file path * @throws IOException {@link IOException} */ public void addScreenCaptureFromPath(String filePath) throws IOException { ITestResult iTestResult = Reporter.getCurrentTestResult(); Preconditions.checkState(iTestResult != null); ExtentTest test = (ExtentTest) iTestResult.getAttribute("test"); test.addScreenCaptureFromPath(filePath); }
Example 4
Source File: MyExtentTestNgFormatter.java From TestHub with MIT License | 3 votes |
/** * Adds a screen shot image file to the report. This method should be used only in the * {@link org.testng.annotations.Test} annotated method * * @param filePath The image file path * @throws IOException {@link IOException} */ public void addScreenCaptureFromPath(String filePath) throws IOException { ITestResult iTestResult = Reporter.getCurrentTestResult(); Preconditions.checkState(iTestResult != null); ExtentTest test = (ExtentTest) iTestResult.getAttribute("test"); test.addScreenCaptureFromPath(filePath); }
Example 5
Source File: MyExtentTestNgFormatter.java From Java-API-Test-Examples with Apache License 2.0 | 2 votes |
/** * Adds a screen shot image file to the report. This method should be used only in the configuration method * and the {@link ITestResult} is the mandatory parameter * * @param iTestResult The {@link ITestResult} object * @param filePath The image file path * @throws IOException {@link IOException} */ public void addScreenCaptureFromPath(ITestResult iTestResult, String filePath) throws IOException { ExtentTest test = (ExtentTest) iTestResult.getAttribute("test"); test.addScreenCaptureFromPath(filePath); }
Example 6
Source File: MyExtentTestNgFormatter.java From Java-API-Test-Examples with Apache License 2.0 | 2 votes |
/** * Adds a screen shot image file to the report. This method should be used only in the configuration method * and the {@link ITestResult} is the mandatory parameter * * @param iTestResult The {@link ITestResult} object * @param filePath The image file path * @throws IOException {@link IOException} */ public void addScreenCaptureFromPath(ITestResult iTestResult, String filePath) throws IOException { ExtentTest test = (ExtentTest) iTestResult.getAttribute("test"); test.addScreenCaptureFromPath(filePath); }
Example 7
Source File: MyExtentTestNgFormatter.java From TestHub with MIT License | 2 votes |
/** * Adds a screen shot image file to the report. This method should be used only in the configuration method * and the {@link ITestResult} is the mandatory parameter * * @param iTestResult The {@link ITestResult} object * @param filePath The image file path * @throws IOException {@link IOException} */ public void addScreenCaptureFromPath(ITestResult iTestResult, String filePath) throws IOException { ExtentTest test = (ExtentTest) iTestResult.getAttribute("test"); test.addScreenCaptureFromPath(filePath); }