firebug xpath usage
来源:互联网 发布:夺命追魂call软件 编辑:程序博客网 时间:2024/06/05 14:38
$x
This command returns an array of HTML or XML elements matching the given XPath expression. This means it is actually a shortcut for document.evaluate()
.
Contents
[hide]- 1Syntax
- 2Parameters
- 2.1xpath
- 2.2contextNode
- 2.3resultType
- 3Examples
- 4See also
[edit]Syntax
$x(xpath [, contextNode [, resultType]])
[edit]Parameters
[edit]xpath
XPath expression used to match the elements to return. This follows the syntax ofdocument.evaluate()
. (required)
[edit]contextNode
Element used as root node for the XPath expression. (optional; added in Firebug 1.11)
[edit]resultType
Object type returned by the function. (optional; added in Firebug 1.11)
document.evaluate()
equivalent"number"
XPathResult.NUMBER_TYPE
Numerical value"string"
XPathResult.STRING_TYPE
String value"bool"
XPathResult.BOOLEAN_TYPE
Boolean value"node"
XPathResult.FIRST_ORDERED_NODE_TYPE
Single HTML element"nodes"
XPathResult.UNORDERED_NODE_ITERATOR_TYPE
Array of HTML elements[edit]Examples
$x("//h1")
This returns an array of all <h1>
s of a page.
$x("//input[@type='checkbox']")
This returns an array of all checkboxes of a page.
$x("count(//h1)>5")
This checks whether there are more than five <h1>
s in the page and returnstrue
or false
. (requires Firebug 1.11 or higher)
$x("//p/b[1]/text()")
This returns an array of all text nodes within every first <b>
of all<p>
s of a page.
$x(".//button", $$("form")[1])
This returns an array of all <buttons>
within the second <form>
of a page. (requires Firebug 1.11 or higher)
$x("//p", document, "node")
This returns the first <p>
inside the page. (requires Firebug 1.11 or higher)
- firebug xpath usage
- Firebug扩展 – CSS Usage
- Firefox firebug and xpath checker
- 利用Firebug和XPath寻找locator
- XPath Checker 和 firebug 插件使用
- Firefox中firebug和xpath checker工具的使用
- Firefox中firebug和xpath checker工具的使用
- FireBug
- fireBug
- firebug
- firebug
- Firebug
- Firebug
- Firebug
- Firebug
- FireBug
- Firebug
- firebug
- source insight使用说明
- Fragment笔记整理
- cocos js 代码修改button背景图等,调用cocos studio 界面(斗地主)
- java double 类型保留小数
- TCP控制字段标志:URG、ACK、PSH、RST、SYN、FIN
- firebug xpath usage
- SurfaceView和View区别总结
- Ios基础知识点总结
- WebP 转 PNG java
- 共享内存
- 《Java设计模式》之构建者模式
- poj 3469 Dual Core CPU (最小割最大流)
- 关于ajax跳转的问题
- 文章标题