• 有关casperjs


    CasperJS安装:http://blog.csdn.net/kandy_ye/article/details/47324715

    casperjs介绍:http://www.cnblogs.com/ziyunfei/archive/2012/09/27/2706254.html

    casperjs用法小结:http://www.verydemo.com/demo_c101_i43000.html

    最近了解购物流程自动化测试的方法,了解到casperjs,问题记录如下:

    1、官网上看到在evaluate中执行element.click()的用法

    casper.evaluate(function() {
    document.querySelectorAll('xxx')[0].click();
    });

    但在实际执行中都没有成功,在evaluate中需要createEvent再dispatchEvent执行成功

    2、程序自动跳转登录

    由于最后的登录链接是动态生成有时效性的链接,而在生成过程中经过了前后端几次跳转,而抓包看程序只跳转了一次,所以暂未实现

    3、设置useragent

    参考 http://www.cnblogs.com/weiguang3100/p/4178343.html?utm_source=tuicool&utm_medium=referral

    ————————————————

    记录一下找的好的资源:

    1、Casperjs重要的概念:执行顺序:http://blog.csdn.net/wsscy2004/article/details/43638759

    2、别人的代码实例:http://stackoverflow.com/questions/21983458/casper-then-does-not-wait-the-end-of-my-instruction-to-execute-the-next-step

    3、动态传入参数:http://www.tuicool.com/articles/eeIji2

    4、casperjs基于phantomjs,可以直接使用phantomjs:http://www.tuicool.com/articles/nieEVv

  • 相关阅读:
    Docker服务启动报错:Job for docker.service failed because the control process exited with error code.
    mysql忘记密码如何重置及修改密码
    linux下的/opt目录作用
    linux防火墙查看状态firewall、iptable
    nmap基本使用方法
    HTTP响应码大全
    端口镜像
    查看占用端口
    restful规范 APIview 解析器组件 Postman
    状态码301和302的区别
  • 原文地址:https://www.cnblogs.com/luke001/p/4943521.html
Copyright © 2020-2023  润新知