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 ...
随机推荐
- 69. JPA实体Bean的生命周期【从零开始学Spring Boot】
[从零开始学习Spirng Boot-常见异常汇总] 在使用JPA的时候,如果对bean的生命周期不了解的话,难免会碰到一些问题,比如:InvalidDataAccessApiUsageExcepti ...
- hdu1059(背包dp二进制优化)
Dividing Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Subm ...
- 2016 Multi-University Training Contest 5 solutions BY ZSTU
ATM Mechine E(i,j):存款的范围是[0,i],还可以被警告j次的期望值. E(i,j) = \(max_{k=1}^{i}{\frac{i-k+1}{i+1} * E(i-k,j)+\ ...
- 【LibreOJ10121】与众不同(RMQ,二分)
题意: 思路: C++ #include<map> #include<set> #include<cmath> #include<cstdio> #in ...
- apache + DSO -动态共享对象(DSO)
http://www.jinbuguo.com/apache/menu22/dso.html
- Python学习之-- IO 操作
阻塞IO / 非阻塞IO /IO多路复用 / 异步IO 说明:同步IO包含(阻塞IO / 非阻塞IO /IO多路复用),因为他们有个共同特性就是都需要内核态到用户态的一个等待. 基本概念解释,环境限定 ...
- Spring Cloud(8):Sleuth和Zipkin的使用
场景: 某大型电商网站基于微服务架构,服务模块有几十个. 某天,测试人员报告该网站响应速度过慢.排除了网络问题之后,发现很难进一步去排除故障. 那么:如何对微服务的链路进行监控呢? Sleuth: 一 ...
- Apache 处理svg工具包Apache(tm) Batik SVG Toolkit
Apache™ Batik SVG Toolkit¶ Overview¶ Batik is a Java-based toolkit for applications or applets that ...
- 【Scrapy】Selectors
Constructing selectors For convenience,response objects exposes a selector on .selector attribute,it ...
- html5摇一摇代码优化
首先对DeviceMotionEvent进行优化: 去除没用的代码,又一次封装DeviceMotionEven if(window.DeviceMotionEvent) { var speed = 2 ...