1.selenium

/**
* @author Young
* @param locator
* @param values
* @throws Exception
*/
protected void typeQuick(Locator locator, String values) throws Exception {
WebElement e = findElement(driver, locator);
log.info("type value is: " + values);
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].value=\""+values+"\"", e);

去掉只读属性

   JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("arguments[0].removeAttribute(\"+"readonly"+\")", e);

https://www.cnblogs.com/tobecrazy/p/4817946.html

第26月第6天 selenium的更多相关文章

  1. 第26月第30天 srt

    1. ffmpeg -i 0.mp4 -vf subtitles=0.srt 1.mp4 https://jingyan.baidu.com/article/c45ad29c73cef2051653e ...

  2. 第26月第29天 ffmpeg yasm

    1. brew install automake fdk-aac git lame libass libtool libvorbis libvpx \ opus sdl shtool texi2htm ...

  3. 第26月第28天 avplayer cache

    1.urlsession https - (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticati ...

  4. 第26月第26天 Domain=AVFoundationErrorDomain Code=-11850

    1. curl -voa http://119.29.108.104:8080/inweb01/kotlin.mp4 -H "Range:bytes=0-1" https://al ...

  5. 第26月第25天 ubuntu openjdk-8-jdk jretty

    1.ubuntu ============== sudo apt-get install openjdk-8-jdk https://blog.csdn.net/zhaohaiyitian88/art ...

  6. 第26月第23天 nsobject 单例 CFAbsoluteTimeGetCurrent

    1.nsobject 单例 sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/ ...

  7. 第26月第22天 iOS瘦身之armv7 armv7s arm64选用 iOS crash

    1.iOS瘦身之armv7 armv7s arm64选用 机器对指令集的支持是向下兼容的,因此armv7的指令集是可以运行在iphone5S以上的,只是效率没那么高而已~ 但是由于苹果要求必须支持ar ...

  8. 第26月第20天 springboot

    --------------------- 1.pom.xml中添加支持web的模块: <dependency> <groupId>org.springframework.bo ...

  9. 第26月第18天 mybatis_spring_mvc

    1. applicationContext.xml  配置文件里最主要的配置: <?xml version="1.0" encoding="utf-8"? ...

随机推荐

  1. 【洛谷P1403】约数研究

    题目大意:求\[\sum\limits_{i=1}^n\sum\limits_{d|i}1\] 题解:交换求和顺序即可. \[\sum\limits_{i=1}^n\sum\limits_{d|i}1 ...

  2. 跟我一起写一个hello-world react组件并发布到npm

    第一步:初始化我们的配置 $ mkdir react-hello-world $ cd react-hello-world/ $ npm init -y 修改我们的package.json文件 //p ...

  3. PHP ACCESS-CONTROL-ALLOW-ORIGIN ,设置跨域头

    php里允许别的域名跨域访问,先解释下跨域 跨域,指的是浏览器不能执行其他网站的脚本.它是由浏览器的同源策略造成的,是浏览器对javascript施加的安全限制. 所谓同源是指,域名,协议,端口均相同 ...

  4. MySQL三层结构、用户权限、索引设计原则

    一.守护进程是什么? Linux Daemon(守护进程)是运行在后台的一种特殊进程.它独立于控制终端并且周期性地执行某种任务或等待处理某些发生的事件.它不需要用户输入就能运行而且提供某种服务,不是对 ...

  5. nginx根据cookie分流

    转载互联网 nginx根据cookie分流众所周知,nginx可以根据url path进行分流,殊不知对于cookie分流也很强大,同时这也是我上篇提到的小流量实验的基础. 二话不说,先看需求,两台服 ...

  6. linux crontab定时任务不执行

    如crontab 没有成功,检测crontab 服务是否启动, /etc/init.d/crond status 查看crond状态 /etc/init.d/crond restart 重启crond ...

  7. maven构建myeclipse 工程

    前提:安装maven完成后 mvn -version查看版本 一,新建WEB 工程  mvn archetype:generate -DgroupId={project-packaging} -Dar ...

  8. JDBC-Batch 批量执行

    JDBC 批处理 SQL 语句 首先在 jdbc 的 url 中加上 rewriteBatchedStatements=true,只有开启了这个 Mysql 才会执行批处理,否则还是一条一条执行 St ...

  9. springmvc上传图片《2》

    创建springboot项目 编写配置 server: port: 8082 spring: application: name: upload-service servlet: multipart: ...

  10. HDU - 6315(2018 Multi-University Training Contest 2) Naive Operations (线段树区间操作)

    http://acm.hdu.edu.cn/showproblem.php?pid=6315 题意 a数组初始全为0,b数组为1-n的一个排列.q次操作,一种操作add给a[l...r]加1,另一种操 ...