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 ...
随机推荐
- 【状压DP】OpenJ_POJ - C17K Lying Island
https://vjudge.net/contest/171652#problem/K [题意] 小岛上有n个人,有些是好人(一定是真话),有些是坏人(可能是真话也可能是假话),现在要判断最多有多少好 ...
- 【bzoj1090】 [SCOI2003]字符串折叠
[bzoj1090] [SCOI2003]字符串折叠 2014年3月9日3,1140 Description 折叠的定义如下: 1. 一个字符串可以看成它自身的折叠.记作S S 2. X(S)是X ...
- Scrapy的log日志功能
Logging Scrapy提供了log功能,可以通过 logging 模块使用 可以修改配置文件settings.py,任意位置添加下面两行 LOG_FILE = "mySpider.lo ...
- PMU 简介
目录 1:PMIC2:Battery管理3:功耗4:常见问题5:参考文献 PMIC[MT6322] Source code structure Build option Battery char ...
- 楼房重建(bzoj 2957)
Description 小A的楼房外有一大片施工工地,工地上有N栋待建的楼房.每天,这片工地上的房子拆了又建.建了又拆.他经常无聊地看着窗外发呆,数自己能够看到多少栋房子. 为了简化问题,我们考虑这些 ...
- [bzoj4006][JLOI2015]管道连接_斯坦纳树_状压dp
管道连接 bzoj-4006 JLOI-2015 题目大意:给定一张$n$个节点$m$条边的带边权无向图.并且给定$p$个重要节点,每个重要节点都有一个颜色.求一个边权和最小的边集使得颜色相同的重要节 ...
- topcoder 650 srm
500 遇到这种构造题 就给跪了 比赛的时候想很多方法 DP,贪心,模拟 发现越写越烦琐.看到别人出这么快,肯定又是奇葩思路. 后来居然想到 2^50的暴力 +剪枝 不过暴力肯定卡你 IDEA: 只要 ...
- SSH移植
1. 下载需要的源码,直接google最新的版本吧 mkdir -p ~/arm/fs ;mkdir -p ~/arm/source 下载zlib: zlib-1.2.3.tar.gz 下载ssl : ...
- Python开发的一个IDE推荐,Sublime Text 3
Sublime Text 3 官网下载地址为, LINK. 目前最新版本是3114. 这里转载泱泱长空的授权文件(注册码)文章[1],将几个可以用的注册码列举如下: 补充:2016.05 最近经过测试 ...
- GAN Generative Adversarial Network 生成式对抗网络-相关内容
参考: https://baijiahao.baidu.com/s?id=1568663805038898&wfr=spider&for=pc Generative Adversari ...