http://www.r9it.com/20171106/puppeteer.html

Puppeteer 至少需要 Node v6.4.0,如要使用 async / await,只有 Node v7.6.0 或更高版本才支持

http://www.cnblogs.com/Stephending/p/4043263.html

http://webdriver.io/guide.html

http://webdriver.io/guide/testrunner/gettingstarted.html

Selenium is great for automated testing of web-apps and I’ve been using the Firefox extension Selenium IDE for a few months now.

For completeness of automated testing for web apps you need to do this in a number of different browsers which Selenium IDE doesn’t do. So you’ll need to download and install Selenium on your Mac.

You can follow my Java or Python instructions to get started and install Selenium on your Mac.

Download Chromedriver to your Mac

Head over to the Chromedriver Project page and download the latest package.

You then need to unzip the package and then copy the file to /usr/bin

This is a hidden system folder so the easy way to get to this file is

  1. Open another finder window
  2. From the Go menu select Go To Folder
  3. Type /usr/bin and press enter

Now drag n drop the Chromedriver file from your Download folder to this directory. You’ll be prompted for you Admin password.

Finally, I suggest you restart your computer  as the next step didn’t work when I tried it.

Basic Test Case for Chromedriver and Selenium

If you’ve already followed my guide to setup Selenium via Python then this will look familiar

Open a terminal window and type the following, pressing enter at the end of each line

python
from selenium import webdriver
driver = webdriver.Chrome()

After a few seconds, if all is well a new instance of Chrome will open

To finish the test just type

driver.get("http://www.damien.co")

To exit Python from your open Terminal, press ctrl+z

Tags: ChromedriverSeleniumtesting

puppeteer,webdriverio, chrome webdriver的更多相关文章

  1. python selenium自动化(三)Chrome Webdriver的兼容

    当一个自动化测试被实现在一个浏览器之后,我们会希望我们的测试能够覆盖到尽量多的别的浏览器.通过跨平台的测试来保证我们的程序在多个浏览器下都能正常工作. 在安装了selenium之后,firefox w ...

  2. puppeteer(headless chrome)实现网站登录

    puppeteer简介 puppeteer是Chrome团队开发的一个node库,可以通过api来控制浏览器的行为,比如点击,跳转,刷新,在控制台执行js脚本等等.有了这个神器,写个爬虫,自动签到,网 ...

  3. webDriver API——第10部分Chrome WebDriver

    class selenium.webdriver.chrome.webdriver.WebDriver(executable_path='chromedriver', port=0, chrome_o ...

  4. Puppeteer: 更友好的 Headless Chrome Node API

    很早很早之前,前端就有了对 headless 浏览器的需求,最多的应用场景有两个 UI 自动化测试:摆脱手工浏览点击页面确认功能模式 爬虫:解决页面内容异步加载等问题 也就有了很多杰出的实现,前端经常 ...

  5. Python selenium.webdriver.chrome.options.Options() Examples

    The following are 27 code examples for showing how to use selenium.webdriver.chrome.options.Options( ...

  6. Headless Chrome入门

    原文地址:Getting Started with Headless Chrome  By EricBidelman  Engineer @ Google working on web tooling ...

  7. puppeteer(三)常用API

    1.Puppeteer 简介 Puppeteer 是一个node库,他提供了一组用来操纵Chrome的API, 通俗来说就是一个 headless chrome浏览器 (当然你也可以配置成有UI的,默 ...

  8. Selenium WebDriver 3.0 需要注意的事项

    以下所有代码基于Java 首先,要使用WebDriver 3.0 的话 请使用JAVA 8(必要)   其次,由于W3C标准化以及各大浏览器厂商的积极跟进,自WebDriver 3.0 之后,Sele ...

  9. 使用python selenium webdriver模拟浏览器

    selenium是进行web自动化测试的一个工具,支持C,C++,Python,Java等语言,他能够实现模拟手工操作浏览器,进行自动化,通过webdriver驱动浏览器操作,我使用的是chrome浏 ...

随机推荐

  1. 【C++基础 03】do...while(0)妙用

    我的主题是,有时候知道一些细节会让你写出更好的代码. ============================================ 之前学coocs2d-x的时候,发现有非常多do...w ...

  2. python(30)- 常用模块

    模块就是py文件.python中能开辟作用域的只有函数.类和模块. for循环不能开辟作用域,for循环内的变量为全局变量.if...else...同for循环一样. 一 time模块 时间表示形式 ...

  3. mysql添加修改字段

    ALTER TABLE `uc_organization` ADD COLUMN `agent_id` VARCHAR(50) NOT NULL DEFAULT 0 COMMENT 'sqlserve ...

  4. php中的正则表达式

    一.定位字符 定位字符是正则表达式中又一类非常重要的字符,它的主要作用是用于对字符在匹配对象中的位置进行描述. ^:表示匹配的模式出现在匹配对象的开头(和在"[]"里面不同) $: ...

  5. js 从数组中随机获取一个值

    // 获取随机数 var rand = Math.floor( Math.random() * this.peoples.length ); // 随机从数组中取出某值(不会改变原数组) var da ...

  6. CSS3 稳固而知新: 居中

    水平居中 transform: translateX(-50%); left: 50%; 垂直居中同理 transform: translateY(-50%);   top:50%;     垂直水平 ...

  7. 使用CSS3实现响应式标题全屏居中和站点前端性能

    要实现标题全屏居中(同一时候在垂直和水平方向居中).有若干种方法,包含使用弹性布局.表格单元.绝对定位和自己主动外边距等. 全屏居中 当中眼下比較流行也比較easy理解的方法是使用绝对定位+偏移实现. ...

  8. SGDMA-----Scatter-gather DMA

    Scatter-gather DMA 使用一个链表描述物理上不连续的存储空间,然后把链表首地址告诉DMA master.DMA master在传输完一块物理连续的数据后,不用发起中断,而是根据链表来传 ...

  9. 解决js下跳转无referer的方法

    HTTP Header referer这玩意主要是告诉人们我是从哪儿来的,就是告诉人家我是从哪个页面过来的,可以用于统计访问本网站的用户来源,也可以用来防盗链.获取这个东西最好的方式是js,如果在服务 ...

  10. MySQL修改参数不重启生效

    地球人都知道,更新mysql配置my.cnf需要重启mysql才能生效,但是有些时候mysql在线上,不一定允许你重启,这时候应该怎么办呢? 看一个例子:mysql> show variable ...