description
The extensoin is intended to provide the following features:
- Provide a action: 'selectRange' to make document selection cross all browsers (Thanks to IE Range by Tim Cameron Ryan);
- Make selenium-ide automatically record the above command type.
It contains two parts, for using with Selenium-Core and the IDE:
- Use 'user-extensions.js' as extension for Selenium-Core.
- Use 'user-extensions.ide.js' as extension for Selenium-IDE.
example of use
select a range within the current document:
| selectRange | [bookmark] |
[bookmark]:A text representation of the selection range in sequence of startNode, startOffset, endNode, endOffset which were separated by the character `, note that startNode/endNode was in form of XPath and startOffset/endOffset simpily the orginial number. An example of the bookmark will be the following, which indicate the range to be selected start from the 3rd character of the start text node, end with the 5th character of the end text node:
//div[@id='body']/p[3]/text()[4]`2`//div[@id='body']/p[3]/text()[4]`6
notes
- Due to the limitation of selenium RC client where it's not possible to extend the client API( e.g. Selenium Java Client API ), this command could take effect in interactive mode of RC only.
- To select document content inside an iframe or pop-up window other than the topmost parent window, another extension of selectWindow could be used to move context to the new window before executing this command.
- This extension is underlayer using the current version of IE Range as a shim library, so the latest build of IE Range may not be included.
download
See Attachment.
