Watir: Get document detail information in Watir.
ie.#{element}(:id,"foo").document.currentstyle.attributeAsCamelCase
so
ie.#{element}(:id,"foo").document.currentstyle.fontFamily
ie.#{element}(:id,"foo").document.currentstyle.fontSize
ie.#{element}(:id,"foo").document.currentstyle.color
Sometimesyou have to use invoke:
ie.#{element}(:id,"foo").document.currentstyle.invoke(attributeAsCamelCase)
thevisible method works this way:
ie.#{element}(:id,"foo").document.currentstyle.invoke("display")
ie.#{element}(:id,"foo").document.currentstyle.invoke("isDisabled")
Find the list of available methods:
ie.#{element}(:id,"foo").document.currentstyle.ole_methods
#puts ie.div(:class,/TopbackgroudTopFont/).document.currentstyle.fontSize
#puts ie.div(:class,/TopbackgroudTopFont/).document.currentstyle.color
#puts ie.div(:class,/TopbackgroudTopFont/).document.currentstyle.backGroundColor
#puts ie.div(:class,/TopbackgroudTopFont/).document.currentstyle.scrollbarBaseColor
Get class name by
puts ie.span(:text,/running/i).class_name
Get the _eventID attribute by:
puts ie.span(:text,/running/i).document.getAttribute("_eventID")
puts $ie.div(:id,"workout_29251129").document.getAttributeNode('_eventID').value
or
puts ie.span(:text,/running/i).attribute_value("_eventID")
Watir: Get document detail information in Watir.的更多相关文章
- NPOI-Excel系列-1002.创建带有Document Summary Information和Summary Information的Excel文件
1. using NPOI.HSSF.UserModel; using NPOI.HPSF; using NPOI.POIFS.FileSystem; using Microsoft.VisualSt ...
- ASP.NET Web API Help Pages using Swagger
Understanding the various methods of an API can be a challenge for a developer when building a consu ...
- P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1
P6 Professional Installation and Configuration Guide (Microsoft SQL Server Database) 16 R1 May ...
- How to Read, Write XLSX File in Java - Apach POI Example---reference
No matter how Microsoft is doing in comparison with Google, Microsoft Office is still the most used ...
- Oracle Global Finanicals Technical Reference(一个)
Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...
- Deploying Customizations in Oracle E-Business Suite Release 12.2
DeployingCustomizations in Oracle E-Business Suite Release 12.2 This documentdescribes how to deploy ...
- Optimizing Item Import Performance in Oracle Product Hub/Inventory
APPLIES TO: Oracle Product Hub - Version 12.1.1 to 12.1.1 [Release 12.1] Oracle Inventory Management ...
- Global Financial Applications uses the following Public tables
来自文档: Oracle Financial Applications Technical Reference Manual 更多明细参考文档 Table Name ...
- Oracle Global Finanicals Technical Reference(一)
Skip Headers Oracle Global Finanicals Oracle Global Financials Technical Reference Manual Release 11 ...
随机推荐
- 74. Spring Data JPA方法定义规范【从零开始学Spring Boot】
[从零开始学习Spirng Boot-常见异常汇总] 事情的起因:有人问过我们这个这个问题:为什么我利用Spring data jpa写的方法没有按照我想要的情况进行执行呢?我记得当时只是告诉他你你先 ...
- bzoj1004 [HNOI2008]Cards 置换群+背包
[bzoj1004][HNOI2008]Cards 2014年5月26日5,3502 Description 小春现在很清闲,面对书桌上的N张牌,他决定给每张染色,目前小春只有3种颜色:红色,蓝色,绿 ...
- idea添加虚拟参数
1. 2.
- 2016 Multi-University Training Contest 7 solutions BY SYSU
Ants 首先求出每个点的最近点. 可以直接对所有点构造kd树,然后在kd树上查询除本身以外的最近点,因为对所有点都求一次,所以不用担心退化. 也可以用分治做,同样是O(NlogN)的复杂度. 方法是 ...
- Codeforces 848C (cdq分治)
Codeforces 848C Goodbye Souvenir Problem : 给一个长度为n的序列,有q个询问.一种询问是修改某个位置的数,另一种询问是询问一段区间,对于每一种值出现的最右端点 ...
- Topcoder 658 650 point
Topcoder 658 div2 500 加强版 不过给了<=20,暴力肯定不行. 然后想DP方程,先二分可能需要的最大次数mid; 然后根据 mid 构造 DP方程. 假设x[i]需要 x个 ...
- Java课堂测试--实现ATM的基本操作体会
9月20的周四的Java课堂第一节课上就是有关于实现ATM的考试内容,在实现的过程中我了解到自己本身还是有很多的不足之处,例如在实现工程方面的相似性上面还有些许就的欠缺,再者就是回宿舍拿电源的原因导致 ...
- cors跨域深刻理解
1.跨域问题只出现在前端和后端不在同一个主机上.前后端在同一个主机上不会出现跨域问题. 2.浏览器的一种自我保护机制,不允许出现本地浏览器ajax异步请求访问127.0.0.1以外的系统,因为浏览器不 ...
- SeaGlass:手工搭建伪基站监控系统
“伪基站”即假基站,设备一般由主机和笔记本电脑或手机组成,通过短信群发器.短信发信机等相关设备能够搜取以其为中心.一定半径范围内的手机卡信息,利用2G移动通信的缺陷,通过伪装成运营商的基站,冒用他人手 ...
- Oracle 10g 升级至10.2.0.4
http://weihaoluo.blog.163.com/blog/static/224418832010112102355652/ 单实例环境 Vmware Server 1.0.6 +Cen ...