Element Locator

Element Locator is to identify the HTML element a command refers to.

HTML
<h1>heading 1</1>
<div id="foo">bar</div>
<a href="http://www.yahoo.com">yahoo.com</a>
<form>
<input type="text" name="keyword">
<input type="checkbox" id="op" name="option"><label for="op">Same Option</label>
<input type="submit" value="Search">
</form>

css

CSS Selector
http://www.w3.org/TR/selectors/

target to "div#foo"
css=div#foo

id

target to "div#foo"
id=foo

name

target to input[type=keyword]
name=keyword

link

target to "a:contains(yahoo.com)"
link=yahoo.com

button

target to submit[value=Search]
button=Search

label

target to "label:contains(Same Option)"
label=Same Option



Last edited Mar 15, 2012 at 4:12 AM by iHarness, version 2

Comments

No comments yet.