Commit 57e0a8e9 authored by 马博's avatar 马博

test

parent cb6d1d2e
...@@ -85,7 +85,7 @@ public class test { ...@@ -85,7 +85,7 @@ public class test {
File file = new File("C:/image"); File file = new File("C:/image");
Reporter.setCurrentTestResult(result); Reporter.setCurrentTestResult(result);
Reporter.log(file.getAbsolutePath()); Reporter.log(file.getAbsolutePath());
Reporter.log("<img src='" + file.getAbsolutePath() + "/" + result.getName() + ".jpg' hight='400' width='400'/>"); Reporter.log("<img src='" + "http://172.16.80.106" + "/" + result.getName() + ".jpg' hight='400' width='400'/>");
File srcFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); //执行屏幕截取 File srcFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); //执行屏幕截取
FileUtils.copyFile(srcFile, new File(file.getAbsolutePath() + "/" + result.getName() + ".jpg")); FileUtils.copyFile(srcFile, new File(file.getAbsolutePath() + "/" + result.getName() + ".jpg"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment