网页自动测试工具 SlimerJS

码农软件 · 软件分类 · 测试工具 · 2019-11-22 22:41:59

软件介绍

SlimerJS 是一个提供给 Web 开发人员,可通过脚本编程控制的浏览器。它可以让你使用 Javascript 脚本操纵一个网页:打开一个网页,点击链接,修改的内容等,这对于做功能测试,页面自动机,网络监控,屏幕捕获等是非常有用的。

事实上,它是类似 PhantomJS 的一个工具,但是 SlimerJS 只能运行在 Gecko (Firefox)上而不是Webkit。SlimerJS 提供几乎和 PhantomJS 相同的 API,高度兼容 PhantomJS。SlimerJS 不仅是 PhantomJS 的一个克隆,还包含额外的功能。

SlimerJS 兼容 CasperJS 1.1 beta!!

示例代码:

var webpage = require('webpage').create();
webpage
  .open('http://somewhere') // loads a page
  .then(function(){ // executed after loading
    // store a screenshot of the page
    webpage.viewportSize =
        { width:650, height:320 };
    webpage.render('page.png',
                   {onlyViewport:true});
    // then open a second page
    return webpage.open('http://somewhere2');
  })
  .then(function(){
    // click somewhere on the second page
    webpage.sendEvent("click", 5, 5,
                        'left', 0);
    slimer.exit()
  });

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

Head First WordPress

Head First WordPress

Siarto Jeff / O'Reilly Media / 2010-02-15 / USD 34.99

Whether you're promoting your business or writing about your travel adventures, "Head First WordPress" will teach you not only how to make your blog look unique and attention-grabbing, but also how to......一起来看看 《Head First WordPress》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

MD5 加密
MD5 加密

MD5 加密工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具