Selenium+phantomJS
来源:互联网 发布:怎么开淘宝网店视频 编辑:程序博客网 时间:2024/05/20 11:20
package com.dong.Selenium;import org.openqa.selenium.phantomjs.PhantomJSDriver;import org.openqa.selenium.phantomjs.PhantomJSDriverService;import org.openqa.selenium.remote.DesiredCapabilities;public class PhantomjsTest { private static final String INDEX_URL = "https://www.gslltd.com.hk/"; public static void main(String[] args) { DesiredCapabilities dcsps = new DesiredCapabilities();//配置文件 dcsps.setCapability("acceptSslCerts", true); dcsps.setCapability("takesScreenshot", true); dcsps.setCapability("cssSelectorsEnabled", true); dcsps.setJavascriptEnabled(true);//支持js //设置phantomJS路径 dcsps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "D:\\aaMARK\\phantomjs-2.0.0-windows\\bin\\phantomjs.exe"); PhantomJSDriver driver = new PhantomJSDriver(dcsps); driver.get(INDEX_URL); System.out.println(driver.getPageSource()); }}
阅读全文
0 0
- selenium phantomjs
- selenium+phantomjs
- Selenium+phantomJS
- phantomjs + selenium headless test
- selenium + PhantomJS 操作
- 爬虫利器:Selenium+PhantomJS
- 使用selenium+phantomjs
- phantomjs+selenium+python爬虫
- Scrapy+Selenium+Phantomjs Demo
- python+selenium+phantomjs 踩坑
- Selenium + phantomjs使用总结
- python selenium phantomjs学习
- 安装Selenium&PhantomJS
- 爬虫-08-selenium & phantomjs
- Python3+phantomjs+selenium配置
- Selenium 与PhantomJS
- 初涉selenium+phantomjs
- Selenium和PhantomJS介绍
- 数据结构之平衡二叉树
- 打印菱形
- java 及lua proto 生成
- C++使用CHttpFile实现Http请求
- 浏览 JDK1.6 API
- Selenium+phantomJS
- Paint.drawArc();参数代表什么
- 712. Minimum ASCII Delete Sum for Two Strings
- 第二章课后习题
- js decimal的开源库
- python调用百度地图API 实现单点沿线轨迹运动
- 利用SXSSFWorkbook导出excel
- jsp将页面的响应方式改为excel
- 使用$.ajaxFileUpload上传时<input type="file">设置的onchange只能执行一次的解决方案