chrome platform
folder_extension:
---menifest.json
---navigator_change.js
manifest.json
{
"manifest_version": 2,
"content_scripts": [ {
"js": [ "navigator_change.js" ],
"matches": [ "<all_urls>"],
"run_at": "document_start"
} ],
"converted_from_user_script": true,
"description": "Fake navigator.platform",
"name": "Android",
"version": "1"
}
navigator_change.js
var codeToInject = 'Object.defineProperty(navigator,"platform", { \
get: function () { return "Android"; }, \
set: function (a) {} \
});';
var script = document.createElement('script');
script.appendChild(document.createTextNode(codeToInject));
(document.head || document.documentElement).appendChild(script);
script.parentNode.removeChild(script);
reference:
https://stackoverflow.com/questions/38808968/change-navigator-platform-on-chrome-firefox-or-ie-to-test-os-detection-code https://stackoverflow.com/questions/9515704/insert-code-into-the-page-context-using-a-content-script https://blog.csdn.net/lovedingd/article/details/81671920 https://blog.csdn.net/weixin_42244754/article/details/81541894 https://stackoverflow.com/questions/45372066/is-it-possible-to-run-google-chrome-in-headless-mode-with-extensions
http://chromedriver.storage.googleapis.com/index.html
chromedriver版本 | 支持的Chrome版本 |
---|---|
v2.41 | v67-69 |
v2.40 | v66-68 |
v2.39 | v66-68 |
v2.38 | v65-67 |
v2.37 | v64-66 |
v2.36 | v63-65 |
v2.35 | v62-64 |
v2.34 | v61-63 |
v2.33 | v60-62 |
v2.32 | v59-61 |
v2.31 | v58-60 |
v2.30 | v58-60 |
v2.29 | v56-58 |
v2.28 | v55-57 |
v2.27 | v54-56 |
v2.26 | v53-55 |
v2.25 | v53-55 |
v2.24 | v52-54 |
v2.23 | v51-53 |
v2.22 | v49-52 |
v2.21 | v46-50 |
v2.20 | v43-48 |
v2.19 | v43-47 |
v2.18 | v43-46 |
v2.17 | v42-43 |
v2.13 | v42-45 |
v2.15 | v40-43 |
v2.14 | v39-42 |
v2.13 | v38-41 |
v2.12 | v36-40 |
v2.11 | v36-40 |
v2.10 | v33-36 |
v2.9 | v31-34 |
v2.8 | v30-33 |
v2.7 | v30-33 |
v2.6 | v29-32 |
v2.5 | v29-32 |
v2.4 |
v29-32 |
chrome platform的更多相关文章
- 全平台 Chrome 浏览器 44.0.2403.89 版本下载
全平台 Chrome 浏览器 44.0.2403.89 版本发布 详细更新日志请参见:https://chromium.googlesource.com/chromium/src/+log/43.0. ...
- 关于selenium的CI、框架……
这段时间除了项目测试外,主要在做web自动化的事情,大致总结一下吧,总体的设计模式pageobject+pagefactory+testng的数据驱动,项目用maven来构建,使用jenkins集成, ...
- selenium Grid(一)
selenium grid Quick Start selenium-grid是用于设计帮助我们进行分布式测试的工具,其整个结构是由一个hub节点和若干个代理节点组成.hub用来管理各个代理节点的注册 ...
- selenium Grid2 分布式自动化测试环境搭建
一.Selenium Server 环境配置 1.selenium grid的组成与作用:由一个集线器hub和多个客户机node组成,如果你的程序需要在不用的浏览器,不同的操作系统上测试,而且比较多的 ...
- 【Selenium-WebDriver自学】Selenium网格化(十六)
参考链接: http://www.yiibai.com/selenium/selenium_grids.html 命令: cd E:\Yingpu\000.SVNYP\01.个人文件夹\Renqian ...
- webdriver API study
This chapter cover all the interfaces of Selenium WebDriver. Recommended Import Style The API defini ...
- selenium grid应用1-多浏览器执行用例
driver =webdriver.Remote(command_executor=’http://127.0.0.1:4444/wd/hub’, desired_capabilities=Desir ...
- webDriver API——第7部分Desired Capabilities
The Desired Capabilities implementation. class selenium.webdriver.common.desired_capabilities.Desire ...
- Selenium-IDE,在网页上模拟人的操作
想偷懒,不想做很机械重复的网页操作,就百度了一下看看有什么方法,能把自己从重复性的网页操作中解放出来,于是,百度到了selenium ide,折腾许久,用最新版火狐添加了自带selenium ide组 ...
随机推荐
- websocket协议的思考
同过wireshark抓包,都是TCP的连接,省了好多的HTTP的头部请求 Ping Pong,TCP keep alive,双方没有数据来往的时候,通过发空白报文,侦测的报文来决定看这个链接是否还存 ...
- Hinge Loss、交叉熵损失、平方损失、指数损失、对数损失、0-1损失、绝对值损失
损失函数(Loss function)是用来估量你模型的预测值 f(x) 与真实值 Y 的不一致程度,它是一个非负实值函数,通常用 L(Y,f(x)) 来表示.损失函数越小,模型的鲁棒性就越好. 损失 ...
- python threading acquire release
线程同步 //test.py import threading import time exitFlag = 0 class myThread (threading.Thread): def __in ...
- iOS UI布局-回到顶部
回到顶部,是比较常用的一个效果 核心代码 在ViewDidLoad中,添加回到顶部按钮 计算偏移量,如果当前显示的内容全部向上隐藏掉,则显示“回到顶部”按钮 // // ViewController. ...
- Java中通过Class类获取Class对象的方法详解
方式1:通过Object类的getObject()方法 Person p = new Person(); Class c = p.getClass(); 方式2: 通过 类名.class 获取到字节码 ...
- JS怎么控制input框的背景颜色
$("input").css("background-color","red"); 参考:https://zhidao.baidu.com/ ...
- js执行上下文
js在执行是会有一个“准备工作”: 主要内容有 1.变量.函数表达式——>变量声明,默认赋值为undefined: 2.this——>赋值: 3.函数声明——>赋值: 这三种数据的准 ...
- python基础-abstractmethod、__属性、property、setter、deleter、classmethod、staticmethod
python基础-abstractmethod.__属性.property.setter.deleter.classmethod.staticmethod
- uvalive 4452 The Ministers’ Major Mess
题意: 有一些部长需要对某些账单进行投票. 一个部长最多对4个账单进行投票,且每票对一个账单通过,要么否决. 问是否存在一个方案使得所有部长有超过半数的投票被通过,如果有,那么说明哪些账单的决定是明确 ...
- 20155228 2016-2017-2 《Java程序设计》第10周学习总结
20155228 2016-2017-2 <Java程序设计>第10周学习总结 教材学习内容总结 网络 网络是能够波此通信的计算机的集合根据范}到的宽度,网络可以分为局域网和广域网.LAN ...