当前位置: 首页 > news >正文

vs2017网站开发时修改的页面未变化做网站的优化价格

vs2017网站开发时修改的页面未变化,做网站的优化价格,wordpress上传本地视频教程,网站公司深圳捕捉视频 有时候我们未必能够分析故障只需用日志文件或截图的帮助。有时捕获完整的执行视频帮助。让我们了解如何捕捉视频。 我们将利用Monte媒体库的执行相同。 配置 第1步#xff1a;导航到URL下载屏幕记录JAR#xff0c;如下图所示。 http://www.randelshofer.ch/monte… 捕捉视频 有时候我们未必能够分析故障只需用日志文件或截图的帮助。有时捕获完整的执行视频帮助。让我们了解如何捕捉视频。 我们将利用Monte媒体库的执行相同。 配置 第1步导航到URL下载屏幕记录JAR如下图所示。 http://www.randelshofer.ch/monte/index.html 第2步下载后添加JAR文件添加到当前项目的库。 第3步我们会利用Java的AWT包来初始化显卡配置。 GraphicsConfiguration gc GraphicsEnvironment   .getLocalGraphicsEnvironment()   .getDefaultScreenDevice()   .getDefaultConfiguration();    第4步它采用下列参数创建ScreenRecorder的一个实例。 示例 我们将捕获简单的测试执行视频 - 百分比计算。 package com.demo.test; import static org.monte.media.FormatKeys.EncodingKey; import static org.monte.media.FormatKeys.FrameRateKey; import static org.monte.media.FormatKeys.KeyFrameIntervalKey; import static org.monte.media.FormatKeys.MIME_AVI; import static org.monte.media.FormatKeys.MediaTypeKey; import static org.monte.media.FormatKeys.MimeTypeKey; import static org.monte.media.VideoFormatKeys.CompressorNameKey; import static org.monte.media.VideoFormatKeys.DepthKey; import static org.monte.media.VideoFormatKeys.ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE; import static org.monte.media.VideoFormatKeys.QualityKey; import java.awt.AWTException; import java.awt.GraphicsConfiguration; import java.awt.GraphicsEnvironment; import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; import org.apache.commons.io.FileUtils; import org.monte.media.Format; import org.monte.media.FormatKeys.MediaType; import org.monte.media.math.Rational; import org.monte.screenrecorder.ScreenRecorder; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class webdriverdemo {     private static ScreenRecorder screenRecorder; public static void main(String[] args) throws IOException, AWTException {         GraphicsConfiguration gconfig GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();         screenRecorder new ScreenRecorder(gconfig, new Format(MediaTypeKey,                 MediaType.FILE, MimeTypeKey, MIME_AVI), new Format(                 MediaTypeKey, MediaType.VIDEO, EncodingKey,                 ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE, CompressorNameKey,                 ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE, DepthKey, (int) 24,                 FrameRateKey, Rational.valueOf(15), QualityKey, 1.0f,                 KeyFrameIntervalKey, (int) (15 * 60)), new Format(MediaTypeKey,                 MediaType.VIDEO, EncodingKey, black, FrameRateKey,                 Rational.valueOf(30)), null); WebDriver driver new ChromeDriver(); // 开始捕获视频         screenRecorder.start(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.navigate().to(https://www.baidu.com/); driver.manage().window().maximize(); for (int i 0; i 3; i) {             driver.findElement(By.id(kw)).sendKeys(selenium, Keys.ENTER);             driver.navigate().forward();             driver.navigate().back();             try {                 Thread.sleep(3000);             } catch (InterruptedException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             }         } File screenshot ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(screenshot, new File(D:screenshotsscreenshots1.jpg)); // 停止捕获视频         screenRecorder.stop();     } } 输出 录制的视频保存在“C:usersUserNameVideos”文件夹如下图所示。 自定义视频位置代码 package webui;import static org.monte.media.FormatKeys.EncodingKey; import static org.monte.media.FormatKeys.FrameRateKey; import static org.monte.media.FormatKeys.KeyFrameIntervalKey; import static org.monte.media.FormatKeys.MIME_AVI; import static org.monte.media.FormatKeys.MediaTypeKey; import static org.monte.media.FormatKeys.MimeTypeKey; import static org.monte.media.VideoFormatKeys.CompressorNameKey; import static org.monte.media.VideoFormatKeys.DepthKey; import static org.monte.media.VideoFormatKeys.ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE; import static org.monte.media.VideoFormatKeys.QualityKey;import java.awt.AWTException; import java.awt.GraphicsConfiguration; import java.awt.GraphicsEnvironment; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.StandardCopyOption; import java.util.List; import java.util.concurrent.TimeUnit;import org.apache.commons.io.FileUtils; import org.monte.media.Format; import org.monte.media.FormatKeys.MediaType; import org.monte.media.math.Rational; import org.monte.screenrecorder.ScreenRecorder; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver;public class webdriverdemo {private static ScreenRecorder screenRecorder;//ScreenRecorder 官方地址可以下载源码//http://www.randelshofer.ch/monte/index.htmlpublic static void main(String[] args) throws IOException, AWTException {GraphicsConfiguration gconfig GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();screenRecorder new ScreenRecorder(gconfig, new Format(MediaTypeKey,MediaType.FILE, MimeTypeKey, MIME_AVI), new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE, CompressorNameKey,ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE, DepthKey, (int) 24,FrameRateKey, Rational.valueOf(15), QualityKey, 1.0f,KeyFrameIntervalKey, (int) (15 * 60)), new Format(MediaTypeKey,MediaType.VIDEO, EncodingKey, black, FrameRateKey,Rational.valueOf(30)), null);WebDriver driver new ChromeDriver();// 开始捕获视频screenRecorder.start();driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);driver.navigate().to(https://www.baidu.com/);driver.manage().window().maximize();for (int i 0; i 3; i) {driver.findElement(By.id(kw)).sendKeys(selenium, Keys.ENTER);driver.navigate().forward();driver.navigate().back();try {Thread.sleep(3000);} catch (InterruptedException e) {// TODO Auto-generated catch blocke.printStackTrace();}}File screenshot ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);FileUtils.copyFile(screenshot, new File(D:/screenshotsscreenshots1.jpg));System.out.println(screenRecorder.getStartTime());String vedioPath ;//默认录制的视频保存在“C:usersUserNameVideos”文件夹如下图所示。//获取视频所在位置这里只有一个视频ListFile ll screenRecorder.getCreatedMovieFiles();for (int i 0; i ll.size(); i) {System.out.println(ll.get(i).getAbsolutePath());vedioPath ll.get(i).getAbsolutePath();}// 停止捕获视频screenRecorder.stop();//复制视频到固定位置FileUtils.copyFile(new File(vedioPath), new File(D:/111.mp4));System.out.println(Finish!!!!!);}public static void copyFile(File srcFile, File destFile, boolean preserveFileDate) throws IOException {if (srcFile.isDirectory()) {throw new IOException(Source srcFile exists but is a directory);} else if (srcFile.getCanonicalPath().equals(destFile.getCanonicalPath())) {throw new IOException(Source srcFile and destination destFile are the same);} else {File parentFile destFile.getParentFile();if (parentFile ! null !parentFile.mkdirs() !parentFile.isDirectory()) {throw new IOException(Destination parentFile directory cannot be created);} else if (destFile.exists() !destFile.canWrite()) {throw new IOException(Destination destFile exists but is read-only);} else {doCopyFile(srcFile, destFile, preserveFileDate);}}}private static void doCopyFile(File srcFile, File destFile, boolean preserveFileDate) throws IOException {if (destFile.exists() destFile.isDirectory()) {throw new IOException(Destination destFile exists but is a directory);} else {Path srcPath srcFile.toPath();Path destPath destFile.toPath();long newLastModifed preserveFileDate ? srcFile.lastModified() : destFile.lastModified();Files.copy(srcPath, destPath, StandardCopyOption.REPLACE_EXISTING);checkEqualSizes(srcFile, destFile, Files.size(srcPath), Files.size(destPath));checkEqualSizes(srcFile, destFile, srcFile.length(), destFile.length());destFile.setLastModified(newLastModifed);}}private static void checkEqualSizes(File srcFile, File destFile, long srcLen, long dstLen) throws IOException {if (srcLen ! dstLen) {throw new IOException(Failed to copy full contents from srcFile to destFile Expected length: srcLen Actual: dstLen);}} }
http://www.pierceye.com/news/253190/

相关文章:

  • 网站设计的安全尺寸正规的培训行业网站开发
  • 网站提交了被收录后改怎么做商丘网站制作教程
  • 建网站被封了网站建设网页设计小江
  • 用node做的网站索引网站有哪些
  • 无锡设计网站建设时尚杂志网站设计分析
  • 嘉定区网站建设网站建设怎么谈
  • 网站开发 毕业设计如何做网站app
  • 优惠券网站开发谷歌seo搜索引擎下载
  • 安徽省建设工程资料上传网站重庆相亲网
  • 河南建设网站官网中英文公司网站
  • 手机版网站如何建设会议响应式网站开发
  • 肇庆住房建设部网站国外专门做旅游攻略的网站
  • 网站如何设置长尾词静态网站开发一体化课程
  • 学校网站建设流程做网站用哪个工具
  • 网站开发工作室策划案域名的价格
  • 郑州艾特网站建设公司互联网保险图片
  • 网站后台任务网站设计建设一般多少钱
  • 电子商务网站设计的基本流程创业商机网农村
  • 公司网站建设的费用如何入账毕节网站开发公司电话
  • 新浪推网站蜘蛛网站长工作职责
  • 百度网站排名关键词整站优化将wordpress部署
  • 做的ASP网站手机微站和网站数据同步
  • 爱站网长尾关键词挖掘工具营销类型网站怎么建设
  • 泉州seo网站推广在线查企业
  • 东营房地产网站建设wordpress文章关键字替换
  • 网站制作哪里好薇网站建设中最重要的环节是
  • 中山做营销型网站石家庄招投标公共服务平台官网
  • 修改wordpress的站点地址WordPress全屏图
  • 购物网站建设源码wordpress如何更改页脚背景颜色
  • 大型网站开发技术注册网站代码