自动化 UI 测试工具 Viff

码农软件 · 软件分类 · GUI 测试工具 · 2019-11-26 13:13:50

软件介绍

Viff 测试框架,它可以不同环境和浏览器下的 Web 页面的视觉差异。

示例代码:

var Viff = require('viff');var viff = new Viff('http://localhost:4444/wd/hub');

viff.takeScreenshot('firefox', 'http://localhost:3000', '/path1', function (bufferImg) 
{  /* buffer of images */  });
// partial of web pages
viff.takeScreenshot('firefox', 'http://localhost:3000', ['path1', '#css-selecor'], 
function (bufferPartialImg) {});
// responsive of web pages
function size(width) {  return function (driver) {
    driver.setWindowSize(width, 600 /* any height*/);
  };
}

viff.takeScreenshot('firefox', 'http://localhost:3000', ['path', size(1024)], 
function (bufferImg) {});
// Q promiseviff.takeScreenshot('firefox', 'http://localhost:3000', ['path', size(1024)])
  .done(function (bufferImg) 
{    /* generate image here */
  })
  .catch(function (err) 
{    /* handle err here */
  })
// using browser
stackviff = new Viff('http://hub.browserstack.com/wd/hub');
viff.takeScreenshot({  'browserName' : 'iPhone',  'platform' : 'MAC',  
'device' : 'iPhone 5',  'browserstack.user': /* your name */,  
'browserstack.key': /* your key */}, 
'http://www.google.com', 'path1', function (bufferImg) {});

Viff Demo Video

本文地址:https://codercto.com/soft/d/19833.html

Algorithms and Theory of Computation Handbook

Algorithms and Theory of Computation Handbook

Mikhail J. Atallah (Editor) / CRC-Press / 1998-09-30 / USD 94.95

Book Description This comprehensive compendium of algorithms and data structures covers many theoretical issues from a practical perspective. Chapters include information on finite precision issues......一起来看看 《Algorithms and Theory of Computation Handbook》 这本书的介绍吧!

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具