360浏览器调用selenium
2019独角兽企业重金招聘Python工程师标准>>>
360浏览器调用selenium
package com.demo;import java.io.File;
import java.io.IOException;import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeDriverService;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;public class demo_360 {ChromeDriverService service;WebDriver driver;@Beforepublic void before(){
// service = new ChromeDriverService.Builder()
// .usingDriverExecutable(new File("F:\\Eclipes\\Luna_WorkSpace\\360browser\\res\\chromedriver.exe"))
// .usingAnyFreePort().build();
// try {
// service.start();
// } catch (IOException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }// driver = new RemoteWebDriver(service.getUrl(), DesiredCapabilities.chrome());System.setProperty("webdriver.chrome.driver", "F:\\Eclipes\\Luna_WorkSpace\\360browser\\res\\chromedriver.exe");
// driver = new ChromeDriver();
// driver.get("http://www.baidu.com/"); }@Testpublic void test(){String browser_url= "C:\\Users\\Administrator\\AppData\\Roaming\\360se6\\Application\\360se.exe";ChromeOptions options = new ChromeOptions();options.setBinary(browser_url); driver=new ChromeDriver(options);driver.get("http://www.baidu.com");WebElement keyword=driver.findElement(By.xpath("//*[@id='kw']"));keyword.sendKeys("abc");}
}http://blog.csdn.net/allan_shore_ma/article/details/63757206
http://blog.csdn.net/qgesxcll/article/details/54986387
转载于:https://my.oschina.net/xiaominmin/blog/1597236
360浏览器调用selenium相关推荐
- python打开360浏览器_python selenium使用360浏览器出现新皮肤设置怎么办?
小编最近在学selenium,在模拟使用360浏览器发现一个问题,就是每次打开后,都会出现皮肤设置选项.刚开始搞不清楚是什么原因,仔细想了一下才发现,这不就是第一次安装360浏览器,第一次使用的时候出 ...
- python3+selenium如何正确驱动360浏览器打开网页
@selenium python3+selenium打开chrome浏览器 首先说明:这是笔记,仅供参考 1.pip install selenium. 2.下载chrome浏览器exe程序,记得查看 ...
- python360安全浏览器_python-selenium自动化测试(火狐、谷歌、360浏览器启动)
一.打开谷歌浏览器 importseleniumfrom selenium importwebdriver browser= webdriver.Chrome(executable_path = 'C ...
- python360安全浏览器_使用python3.7 的pycharm selenium自动化测试中启动360浏览器、360极速浏览器的方法...
写于:2019.01.02(实测日) 一.下载360浏览器或360极速浏览器的Chrome驱动 这里最好下载去官网下载最新版的浏览器,版本越新,越利于安装.在做自动化测试中不可能只用360浏览器,也会 ...
- python360安全浏览器_python3.7--pycharm selenium自启360浏览器/360极速浏览器方法
写于:2019.01.02(实测日) 一.下载360浏览器或360极速浏览器的Chrome驱动 这里最好下载去官网下载最新版的浏览器,版本越新,越利于安装.在做自动化测试中不可能只用360浏览器,也会 ...
- html调用谷歌内核,360浏览器指定Webkit(chrome)内核
起因 很多web开发者对360浏览器都没有什么好感,拥有着庞大的用户量,但又因为种种特性导致网页兼容问题,尤其是360安全浏览器提供的双内核功能,总是将网站用IE内核去解析,而自己的网站 http:/ ...
- python+selenium环境配置及浏览器调用
最近在学习python自动化,从项目角度和技术基础角度出发,我选择了python+selenium+appium的模式开始我的自动化测试之旅: 一.python安装 二.python IDE使用简介 ...
- Python+selenium+360浏览器实现自动测试
最近,因工作需要爬取一个系统的数据.该系统只能用低版本IE浏览器,所以尝试了用360浏览器,考虑能够让更多人扩展该爬虫,选取selenium驱动浏览器.现在把需要用到的主要技术点整理如下,备以后查询. ...
- Selenium安装与360浏览器使用
文章目录 selenium笔记 安装 1. 安装Selenium库 2. 下载安装浏览器驱动 3. 开始使用 selenium笔记 安装 1. 安装Selenium库 pip install Sele ...
最新文章
- WPF 曲线图表控件(自制)(二)
- linux内核杂记(2)-内核的同步与并发
- python中csv模块读写文件
- Redis的两种持久化机制RDB和AOF
- 牛客多校6 - Josephus Transform(线段树求k-约瑟夫环+置换群的幂)
- php7 memcached sasl,Mac安装memcached扩展支持sasl
- 能过ChilkatDotNet4.dll组件,开发SFTP,上传下载功能。
- Oracle 项目就是那回事 ----表空间的管理
- IDEA运行test出现 Failed to execute goal org.codehaus.mojo:exec-maven-plugin:16.0.0:exec (default-cli) on
- 查询一个表中一个字段相同的数据_最实用MySQL 查询当天、本周,本月、上一个月的数据...
- mysql 不等于查询优化_MySQL查询性能优化
- 计算机-计算机发展史
- 计算机折线图教程,excel怎么插入折线图 excel怎么将多个折线图合并
- 【捣鼓】TypeError: “x” is not a constructor
- 读书 | 如何像沉迷游戏一样对工作上瘾?
- 多线程任务超时的处理机制
- 茶文化网页代码(详细解释)
- 华为运维客户端SeoClient接收返回码错误
- Linux 系统中 resolv.conf 文件详解
- 听说蚂蚁金服上市,但是实现财务自由的只是那些架构师?