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 ...
随机推荐
- PTA 02-线性结构4 Pop Sequence (25分)
题目地址 https://pta.patest.cn/pta/test/16/exam/4/question/665 5-3 Pop Sequence (25分) Given a stack wh ...
- OSPF选路原则
1:O路由>Oia路由>external路由! O:计算LSA-1和LSA-2,前提age不能MaxAge,metric不能LSinfinity,计算出来的最小metric的路由放入RIB ...
- 搜狗大数据总监、Polarr 联合创始人关于深度学习的分享交流 | 架构师小组交流会
架构师小组交流会是由国内知名公司技术专家参与的技术交流会,每期选择一个时下最热门的技术话题进行实践经验分享.第一期:来自沪江.滴滴.蘑菇街.扇贝架构师的 Docker 实践分享 第二期:来自滴滴.微博 ...
- 16.1117 NOIP 模拟赛
水灾(sliker.cpp/c/pas) 1000MS 64MB 大雨应经下了几天雨,却还是没有停的样子.土豪CCY刚从外地赚完1e元回来,知道不久除了自己别墅,其他的地方都将会被洪水淹没. CCY ...
- 【搜索引擎】SOLR VS Elasticsearch(2019技术选型参考)
SOLR是什么 (官方的解释) Solr是基于Apache Lucene构建的流行的.快速的.开源的企业搜索平台. Solr也是高度可靠.可伸缩和容错的,提供分布式索引.复制和负载平衡查询.自动故障转 ...
- 洛谷——P1551 亲戚
题目背景 若某个家族人员过于庞大,要判断两个是否是亲戚,确实还很不容易,现在给出某个亲戚关系图,求任意给出的两个人是否具有亲戚关系. 题目描述 规定:x和y是亲戚,y和z是亲戚,那么x和z也是亲戚.如 ...
- Spoj 3267 DQUERY - D-query
题目描述 English VietnameseGiven a sequence of n numbers a _{1}1 , a _{2}2 , ..., a _{n}n and a numbe ...
- SQL根据某一父节点查询所有子节点,无限
;with cte as( select id,ParentCategoryId from Category where id = 17 union all select a.id,a.ParentC ...
- pip命令自动补全功能;设置代理;使用国内源
这是pip自带的功能 执行的脚本 把脚本写入.zshrc或者profile等里面,执行source立即生效 设置代理: pip --proxy=http://username:password@pro ...
- [转]JAVA对象容器
要用Java实现记事本的功能.首先列出记事本所需功能: 可以添加记录(字符串): 可以获得记录条数: 可以删除其中某一条记录: 可以获得指定第几条的记录: 可以列出所有的记录. 如果这个记事本是某个大 ...