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. Spring 注入简介

    注入方式有三种,setter,构造方法,接口注入.   常用的是setter注入和构造方法注入.   setter注入: <?xml version="1.0" encodi ...

  2. hibernate 继承映射关系( TABLE_PER_CLASS)

    Person,Student,Teacher各创建一个表,主键用一个中间表生成.   package com.bjsxt.hibernate; import javax.persistence.Ent ...

  3. 用BSF + Beanshell使Java程序能够运行字符串形式的代码(转载)

    BSF(Bean Scripting Framework)最初是IBM Alpha工作组的项目,后来贡献给了Apache,BSF使Java能够更好的与各种流行脚本语言整合,实现不同语言之间的交互功能. ...

  4. web本地存储localStorage和sessionStorage

    用谷歌浏览器调试网页程序时候发现有一个这个栏目 记录本地存储的相关信息(cookie,sessionStorage,LocalStorage等)的存储信息 1.LocalStorage localst ...

  5. spring学习笔记(六)

    1.配置环绕通知 需要实现的接口为  MethodInterceptor   代码举例 package com.huawei.aop; import org.aopalliance.intercept ...

  6. JanusGraph与Cassandra集成模式

    //如果使用的是cassandra 2.2或更高版本,需要开启thift,以使janus连接到cassandra. ./bin/nodetool enablethrift. 15.1 Local Se ...

  7. Redis之Hash数据结构

    0.前言 redis是KV型的内存数据库, 数据库存储的核心就是Hash表, 我们执行select命令选择一个存储的db之后, 所有的操作都是以hash表为基础的, 下面会分析下redis的hash数 ...

  8. python模块学习之os

    16.1. os-复杂的操作系统接口 Source code: Lib/os.py 该模块提供了使用操作系统相关功能的便携式方法. 如果您只想读或写一个文件,请参阅open(),如果要操作路径,请参阅 ...

  9. 使用VS2015 时 报LNK1104 找不到exe.manifest 的解决方法

    一般都是由于工程配置文件导致的错误,暴力方法: 直接用文本工具打开.vcxproj文件.搜索AdditionalManifestFiles ,然后根据当前工程目录进行更改

  10. mysql存在就更新,不存在就新增

    INSERT INTO newest_log_operation(    ACTION, OPERATION, KEY_VALUE, BUS_KEY, CONTENT, USER_ID, VERSIO ...