source: project/release/3/selenium/trunk/selenium.html @ 9606

Last change on this file since 9606 was 9606, checked in by rlpowell, 12 years ago

Documentation and category update, take 2.

  • Property svn:keywords set to Id
File size: 148.8 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html401/loose.dtd"><html><head><meta name="GENERATOR" content="Mole: The Scheme Source Code Digger"><title>selenium.scm Documentation</title><meta name='keywords' content=''></head><body bgcolor='#ffffff' text='#384412'  link='#11af05' vlink='#728b09'>
2<center><h1>selenium.scm Documentation</h1></center>
3<p><br>
4<!-- Table of content -->
5<p><dl>
6<p><dt><a name='tocchapt10224' href='#chapt10224'><b>Introduction And Copyright</b></a><dd>
7
8<dl><dt><a name='tocsect43890' href='#sect43890'><b>Explanation And Examples</b></a><dd>
9</dl>
10
11<dl><dt><a name='tocsect16396' href='#sect16396'><b>Selenium Session</b></a><dd>
12
13f:  <a name='tocfunc62238' href='#docfunc62238' style='text-decoration:none'>new-selenium-session</a><br>
14</dl>
15
16<dl><dt><a name='tocsect17776' href='#sect17776'><b>Internal commands</b></a><dd>
17
18f:  <a name='tocfunc57818' href='#docfunc57818' style='text-decoration:none'>selenium::do-command</a><br>
19
20f:  <a name='tocfunc46125' href='#docfunc46125' style='text-decoration:none'>selenium::get-string</a><br>
21
22f:  <a name='tocfunc47386' href='#docfunc47386' style='text-decoration:none'>selenium::get-number</a><br>
23
24f:  <a name='tocfunc44158' href='#docfunc44158' style='text-decoration:none'>selenium::get-boolean</a><br>
25
26f:  <a name='tocfunc303' href='#docfunc303' style='text-decoration:none'>selenium::get-string-array</a><br>
27
28f:  <a name='tocfunc1564' href='#docfunc1564' style='text-decoration:none'>selenium::get-number-array</a><br>
29
30f:  <a name='tocfunc1564' href='#docfunc1564' style='text-decoration:none'>selenium::get-number-array</a><br>
31</dl>
32
33<dl><dt><a name='tocsect7932' href='#sect7932'><b>Starting and Stopping</b></a><dd>
34
35f:  <a name='tocfunc49990' href='#docfunc49990' style='text-decoration:none'>selenium::start</a><br>
36
37f:  <a name='tocfunc49376' href='#docfunc49376' style='text-decoration:none'>selenium::stop</a><br>
38</dl>
39
40<dl><dt><a name='tocsect28791' href='#sect28791'><b>Generated Commands</b></a><dd>
41
42f:  <a name='tocfunc44085' href='#docfunc44085' style='text-decoration:none'>selenium::click</a><br>
43
44f:  <a name='tocfunc19315' href='#docfunc19315' style='text-decoration:none'>selenium::double_click</a><br>
45
46f:  <a name='tocfunc32663' href='#docfunc32663' style='text-decoration:none'>selenium::click_at</a><br>
47
48f:  <a name='tocfunc44358' href='#docfunc44358' style='text-decoration:none'>selenium::double_click_at</a><br>
49
50f:  <a name='tocfunc59930' href='#docfunc59930' style='text-decoration:none'>selenium::fire_event</a><br>
51
52f:  <a name='tocfunc34603' href='#docfunc34603' style='text-decoration:none'>selenium::key_press</a><br>
53
54f:  <a name='tocfunc44303' href='#docfunc44303' style='text-decoration:none'>selenium::shift_key_down</a><br>
55
56f:  <a name='tocfunc16297' href='#docfunc16297' style='text-decoration:none'>selenium::shift_key_up</a><br>
57
58f:  <a name='tocfunc25569' href='#docfunc25569' style='text-decoration:none'>selenium::meta_key_down</a><br>
59
60f:  <a name='tocfunc64883' href='#docfunc64883' style='text-decoration:none'>selenium::meta_key_up</a><br>
61
62f:  <a name='tocfunc19092' href='#docfunc19092' style='text-decoration:none'>selenium::alt_key_down</a><br>
63
64f:  <a name='tocfunc56621' href='#docfunc56621' style='text-decoration:none'>selenium::alt_key_up</a><br>
65
66f:  <a name='tocfunc12655' href='#docfunc12655' style='text-decoration:none'>selenium::control_key_down</a><br>
67
68f:  <a name='tocfunc50184' href='#docfunc50184' style='text-decoration:none'>selenium::control_key_up</a><br>
69
70f:  <a name='tocfunc32446' href='#docfunc32446' style='text-decoration:none'>selenium::key_down</a><br>
71
72f:  <a name='tocfunc4440' href='#docfunc4440' style='text-decoration:none'>selenium::key_up</a><br>
73
74f:  <a name='tocfunc1819' href='#docfunc1819' style='text-decoration:none'>selenium::mouse_over</a><br>
75
76f:  <a name='tocfunc37929' href='#docfunc37929' style='text-decoration:none'>selenium::mouse_out</a><br>
77
78f:  <a name='tocfunc64545' href='#docfunc64545' style='text-decoration:none'>selenium::mouse_down</a><br>
79
80f:  <a name='tocfunc24053' href='#docfunc24053' style='text-decoration:none'>selenium::mouse_down_at</a><br>
81
82f:  <a name='tocfunc36539' href='#docfunc36539' style='text-decoration:none'>selenium::mouse_up</a><br>
83
84f:  <a name='tocfunc61582' href='#docfunc61582' style='text-decoration:none'>selenium::mouse_up_at</a><br>
85
86f:  <a name='tocfunc62249' href='#docfunc62249' style='text-decoration:none'>selenium::mouse_move</a><br>
87
88f:  <a name='tocfunc21757' href='#docfunc21757' style='text-decoration:none'>selenium::mouse_move_at</a><br>
89
90f:  <a name='tocfunc47842' href='#docfunc47842' style='text-decoration:none'>selenium::type</a><br>
91
92f:  <a name='tocfunc40986' href='#docfunc40986' style='text-decoration:none'>selenium::type_keys</a><br>
93
94f:  <a name='tocfunc30498' href='#docfunc30498' style='text-decoration:none'>selenium::set_speed</a><br>
95
96f:  <a name='tocfunc30486' href='#docfunc30486' style='text-decoration:none'>selenium::get_speed</a><br>
97
98f:  <a name='tocfunc43057' href='#docfunc43057' style='text-decoration:none'>selenium::check</a><br>
99
100f:  <a name='tocfunc5799' href='#docfunc5799' style='text-decoration:none'>selenium::uncheck</a><br>
101
102f:  <a name='tocfunc6977' href='#docfunc6977' style='text-decoration:none'>selenium::select</a><br>
103
104f:  <a name='tocfunc20190' href='#docfunc20190' style='text-decoration:none'>selenium::add_selection</a><br>
105
106f:  <a name='tocfunc12642' href='#docfunc12642' style='text-decoration:none'>selenium::remove_selection</a><br>
107
108f:  <a name='tocfunc65440' href='#docfunc65440' style='text-decoration:none'>selenium::remove_all_selections</a><br>
109
110f:  <a name='tocfunc13117' href='#docfunc13117' style='text-decoration:none'>selenium::submit</a><br>
111
112f:  <a name='tocfunc47826' href='#docfunc47826' style='text-decoration:none'>selenium::open</a><br>
113
114f:  <a name='tocfunc4215' href='#docfunc4215' style='text-decoration:none'>selenium::open_window</a><br>
115
116f:  <a name='tocfunc28901' href='#docfunc28901' style='text-decoration:none'>selenium::select_window</a><br>
117
118f:  <a name='tocfunc18560' href='#docfunc18560' style='text-decoration:none'>selenium::select_frame</a><br>
119
120f:  <a name='tocfunc57766' href='#docfunc57766' style='text-decoration:none'>selenium::get_whether_this_frame_match_frame_expression</a><br>
121
122f:  <a name='tocfunc23368' href='#docfunc23368' style='text-decoration:none'>selenium::get_whether_this_window_match_window_expression</a><br>
123
124f:  <a name='tocfunc57675' href='#docfunc57675' style='text-decoration:none'>selenium::wait_for_pop_up</a><br>
125
126f:  <a name='tocfunc58889' href='#docfunc58889' style='text-decoration:none'>selenium::choose_cancel_on_next_confirmation</a><br>
127
128f:  <a name='tocfunc7748' href='#docfunc7748' style='text-decoration:none'>selenium::choose_ok_on_next_confirmation</a><br>
129
130f:  <a name='tocfunc11680' href='#docfunc11680' style='text-decoration:none'>selenium::answer_on_next_prompt</a><br>
131
132f:  <a name='tocfunc4497' href='#docfunc4497' style='text-decoration:none'>selenium::go_back</a><br>
133
134f:  <a name='tocfunc10148' href='#docfunc10148' style='text-decoration:none'>selenium::refresh</a><br>
135
136f:  <a name='tocfunc48181' href='#docfunc48181' style='text-decoration:none'>selenium::close</a><br>
137
138f:  <a name='tocfunc14937' href='#docfunc14937' style='text-decoration:none'>selenium::is_alert_present</a><br>
139
140f:  <a name='tocfunc21450' href='#docfunc21450' style='text-decoration:none'>selenium::is_prompt_present</a><br>
141
142f:  <a name='tocfunc36855' href='#docfunc36855' style='text-decoration:none'>selenium::is_confirmation_present</a><br>
143
144f:  <a name='tocfunc32788' href='#docfunc32788' style='text-decoration:none'>selenium::get_alert</a><br>
145
146f:  <a name='tocfunc8806' href='#docfunc8806' style='text-decoration:none'>selenium::get_confirmation</a><br>
147
148f:  <a name='tocfunc62761' href='#docfunc62761' style='text-decoration:none'>selenium::get_prompt</a><br>
149
150f:  <a name='tocfunc18829' href='#docfunc18829' style='text-decoration:none'>selenium::get_location</a><br>
151
152f:  <a name='tocfunc30503' href='#docfunc30503' style='text-decoration:none'>selenium::get_title</a><br>
153
154f:  <a name='tocfunc30425' href='#docfunc30425' style='text-decoration:none'>selenium::get_body_text</a><br>
155
156f:  <a name='tocfunc30753' href='#docfunc30753' style='text-decoration:none'>selenium::get_value</a><br>
157
158f:  <a name='tocfunc31430' href='#docfunc31430' style='text-decoration:none'>selenium::get_text</a><br>
159
160f:  <a name='tocfunc32789' href='#docfunc32789' style='text-decoration:none'>selenium::highlight</a><br>
161
162f:  <a name='tocfunc33696' href='#docfunc33696' style='text-decoration:none'>selenium::get_eval</a><br>
163
164f:  <a name='tocfunc59383' href='#docfunc59383' style='text-decoration:none'>selenium::is_checked</a><br>
165
166f:  <a name='tocfunc28437' href='#docfunc28437' style='text-decoration:none'>selenium::get_table</a><br>
167
168f:  <a name='tocfunc32795' href='#docfunc32795' style='text-decoration:none'>selenium::get_selected_labels</a><br>
169
170f:  <a name='tocfunc32680' href='#docfunc32680' style='text-decoration:none'>selenium::get_selected_label</a><br>
171
172f:  <a name='tocfunc36139' href='#docfunc36139' style='text-decoration:none'>selenium::get_selected_values</a><br>
173
174f:  <a name='tocfunc36024' href='#docfunc36024' style='text-decoration:none'>selenium::get_selected_value</a><br>
175
176f:  <a name='tocfunc65050' href='#docfunc65050' style='text-decoration:none'>selenium::get_selected_indexes</a><br>
177
178f:  <a name='tocfunc35509' href='#docfunc35509' style='text-decoration:none'>selenium::get_selected_index</a><br>
179
180f:  <a name='tocfunc8518' href='#docfunc8518' style='text-decoration:none'>selenium::get_selected_ids</a><br>
181
182f:  <a name='tocfunc44613' href='#docfunc44613' style='text-decoration:none'>selenium::get_selected_id</a><br>
183
184f:  <a name='tocfunc7797' href='#docfunc7797' style='text-decoration:none'>selenium::is_something_selected</a><br>
185
186f:  <a name='tocfunc42692' href='#docfunc42692' style='text-decoration:none'>selenium::get_select_options</a><br>
187
188f:  <a name='tocfunc24307' href='#docfunc24307' style='text-decoration:none'>selenium::get_attribute</a><br>
189
190f:  <a name='tocfunc61519' href='#docfunc61519' style='text-decoration:none'>selenium::is_text_present</a><br>
191
192f:  <a name='tocfunc41922' href='#docfunc41922' style='text-decoration:none'>selenium::is_element_present</a><br>
193
194f:  <a name='tocfunc262' href='#docfunc262' style='text-decoration:none'>selenium::is_visible</a><br>
195
196f:  <a name='tocfunc60518' href='#docfunc60518' style='text-decoration:none'>selenium::is_editable</a><br>
197
198f:  <a name='tocfunc50528' href='#docfunc50528' style='text-decoration:none'>selenium::get_all_buttons</a><br>
199
200f:  <a name='tocfunc16885' href='#docfunc16885' style='text-decoration:none'>selenium::get_all_links</a><br>
201
202f:  <a name='tocfunc46551' href='#docfunc46551' style='text-decoration:none'>selenium::get_all_fields</a><br>
203
204f:  <a name='tocfunc13370' href='#docfunc13370' style='text-decoration:none'>selenium::get_attribute_from_all_windows</a><br>
205
206f:  <a name='tocfunc39063' href='#docfunc39063' style='text-decoration:none'>selenium::dragdrop</a><br>
207
208f:  <a name='tocfunc47466' href='#docfunc47466' style='text-decoration:none'>selenium::set_mouse_speed</a><br>
209
210f:  <a name='tocfunc47454' href='#docfunc47454' style='text-decoration:none'>selenium::get_mouse_speed</a><br>
211
212f:  <a name='tocfunc20435' href='#docfunc20435' style='text-decoration:none'>selenium::drag_and_drop</a><br>
213
214f:  <a name='tocfunc23523' href='#docfunc23523' style='text-decoration:none'>selenium::drag_and_drop_to_object</a><br>
215
216f:  <a name='tocfunc24215' href='#docfunc24215' style='text-decoration:none'>selenium::window_focus</a><br>
217
218f:  <a name='tocfunc61259' href='#docfunc61259' style='text-decoration:none'>selenium::window_maximize</a><br>
219
220f:  <a name='tocfunc36544' href='#docfunc36544' style='text-decoration:none'>selenium::get_all_window_ids</a><br>
221
222f:  <a name='tocfunc291' href='#docfunc291' style='text-decoration:none'>selenium::get_all_window_names</a><br>
223
224f:  <a name='tocfunc165' href='#docfunc165' style='text-decoration:none'>selenium::get_all_window_titles</a><br>
225
226f:  <a name='tocfunc52821' href='#docfunc52821' style='text-decoration:none'>selenium::get_html_source</a><br>
227
228f:  <a name='tocfunc50234' href='#docfunc50234' style='text-decoration:none'>selenium::set_cursor_position</a><br>
229
230f:  <a name='tocfunc7364' href='#docfunc7364' style='text-decoration:none'>selenium::get_element_index</a><br>
231
232f:  <a name='tocfunc64003' href='#docfunc64003' style='text-decoration:none'>selenium::is_ordered</a><br>
233
234f:  <a name='tocfunc52350' href='#docfunc52350' style='text-decoration:none'>selenium::get_element_position_left</a><br>
235
236f:  <a name='tocfunc56852' href='#docfunc56852' style='text-decoration:none'>selenium::get_element_position_top</a><br>
237
238f:  <a name='tocfunc9922' href='#docfunc9922' style='text-decoration:none'>selenium::get_element_width</a><br>
239
240f:  <a name='tocfunc35256' href='#docfunc35256' style='text-decoration:none'>selenium::get_element_height</a><br>
241
242f:  <a name='tocfunc50222' href='#docfunc50222' style='text-decoration:none'>selenium::get_cursor_position</a><br>
243
244f:  <a name='tocfunc55031' href='#docfunc55031' style='text-decoration:none'>selenium::get_expression</a><br>
245
246f:  <a name='tocfunc50024' href='#docfunc50024' style='text-decoration:none'>selenium::get_xpath_count</a><br>
247
248f:  <a name='tocfunc37117' href='#docfunc37117' style='text-decoration:none'>selenium::assign_id</a><br>
249
250f:  <a name='tocfunc35296' href='#docfunc35296' style='text-decoration:none'>selenium::allow_native_xpath</a><br>
251
252f:  <a name='tocfunc40388' href='#docfunc40388' style='text-decoration:none'>selenium::wait_for_condition</a><br>
253
254f:  <a name='tocfunc58794' href='#docfunc58794' style='text-decoration:none'>selenium::set_timeout</a><br>
255
256f:  <a name='tocfunc65402' href='#docfunc65402' style='text-decoration:none'>selenium::wait_for_page_to_load</a><br>
257
258f:  <a name='tocfunc24457' href='#docfunc24457' style='text-decoration:none'>selenium::wait_for_frame_to_load</a><br>
259
260f:  <a name='tocfunc57621' href='#docfunc57621' style='text-decoration:none'>selenium::get_cookie</a><br>
261
262f:  <a name='tocfunc20954' href='#docfunc20954' style='text-decoration:none'>selenium::create_cookie</a><br>
263
264f:  <a name='tocfunc18658' href='#docfunc18658' style='text-decoration:none'>selenium::delete_cookie</a><br>
265
266f:  <a name='tocfunc59839' href='#docfunc59839' style='text-decoration:none'>selenium::set_browser_log_level</a><br>
267
268f:  <a name='tocfunc62004' href='#docfunc62004' style='text-decoration:none'>selenium::run_script</a><br>
269
270f:  <a name='tocfunc2699' href='#docfunc2699' style='text-decoration:none'>selenium::add_location_strategy</a><br>
271
272f:  <a name='tocfunc64912' href='#docfunc64912' style='text-decoration:none'>selenium::set_context</a><br>
273
274f:  <a name='tocfunc38874' href='#docfunc38874' style='text-decoration:none'>selenium::capture_screenshot</a><br>
275</dl>
276</dl>
277<hr height='5'><center><h3><a name='chapt10224' href='#tocchapt10224'>Introduction And Copyright</a></h3></center>
278
279<pre>
280This file is autogenerated by the iedoc2scm.xml XSLT stylesheet,
281using iedoc.xml as the source.  See
282http://wiki.openqa.org/display/SRC/Developer%27s+Guide#Developer%27sGuide-IEDoc.js%2CIEDoc.xmlandXSLT
283for how to get iedoc.xml
284
285The specification this works from is at
286http://wiki.openqa.org/display/SRC/Specifications+for+Selenium+Remote+Control+Client+Driver+Protocol
287
288Copyright 2008 Robin Lee Powell, sort of.
289
290The XSLT is almost entirely copied from the Ruby Selenium RC
291XSLT, which was created by ThoughtWorks, Inc., and licensed
292under the Apache License, Version 2.0 (the &quot;License&quot;).  All the
293Scheme and all my modifications are placed into the public domain
294as much as that license allows.
295
296http://www.apache.org/licenses/LICENSE-2.0
297
298-----------------
299Original code by Aslak Hellesoy and Darren Hobbs
300This file has been automatically generated via XSL
301-----------------
302</pre>
303<hr width='40%' align='center'><center><h3><a name='sect43890' href='#tocsect43890'>Explanation And Examples</a></h3></center>
304
305<pre>
306Defines an object that runs Selenium commands.
307
308Element Locators
309Element Locators tell Selenium which HTML element a command refers to.
310The format of a locator is:
311&lt;em&gt;locatorType&lt;/em&gt;&lt;b&gt;=&lt;/b&gt;&lt;em&gt;argument&lt;/em&gt;
312We support the following strategies for locating elements:
313
314&lt;b&gt;identifier&lt;/b&gt;=&lt;em&gt;id&lt;/em&gt;:
315Select the element with the specified @id attribute. If no match is
316found, select the first element whose @name attribute is &lt;em&gt;id&lt;/em&gt;.
317(This is normally the default; see below.)&lt;b&gt;id&lt;/b&gt;=&lt;em&gt;id&lt;/em&gt;:
318Select the element with the specified @id attribute.&lt;b&gt;name&lt;/b&gt;=&lt;em&gt;name&lt;/em&gt;:
319Select the first element with the specified @name attribute.
320usernamename=username
321The name may optionally be followed by one or more &lt;em&gt;element-filters&lt;/em&gt;, separated from the name by whitespace.  If the &lt;em&gt;filterType&lt;/em&gt; is not specified, &lt;b&gt;value&lt;/b&gt; is assumed.
322name=flavour value=chocolate
323&lt;b&gt;dom&lt;/b&gt;=&lt;em&gt;javascriptExpression&lt;/em&gt;:
324
325Find an element by evaluating the specified string.  This allows you to traverse the HTML Document Object
326Model using JavaScript.  Note that you must not return a value in this string; simply make it the last expression in the block.
327dom=document.forms['myForm'].myDropdowndom=document.images[56]dom=function foo() { return document.links[1]; }; foo();
328&lt;b&gt;xpath&lt;/b&gt;=&lt;em&gt;xpathExpression&lt;/em&gt;:
329Locate an element using an XPath expression.
330xpath=//img[@alt='The image alt text']xpath=//table[@id='table1']//tr[4]/td[2]xpath=//a[contains(@href,'#id1')]xpath=//a[contains(@href,'#id1')]/@classxpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../tdxpath=//input[@name='name2' and @value='yes']xpath=//*[text()=&quot;right&quot;]
331&lt;b&gt;link&lt;/b&gt;=&lt;em&gt;textPattern&lt;/em&gt;:
332Select the link (anchor) element which contains text matching the
333specified &lt;em&gt;pattern&lt;/em&gt;.
334link=The link text
335&lt;b&gt;css&lt;/b&gt;=&lt;em&gt;cssSelectorSyntax&lt;/em&gt;:
336Select the element using css selectors. Please refer to CSS2 selectors, CSS3 selectors for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.
337css=a[href=&quot;#id3&quot;]css=span#firstChild + span
338Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after).
339
340
341Without an explicit locator prefix, Selenium uses the following default
342strategies:
343
344&lt;b&gt;dom&lt;/b&gt;, for locators starting with &quot;document.&quot;&lt;b&gt;xpath&lt;/b&gt;, for locators starting with &quot;//&quot;&lt;b&gt;identifier&lt;/b&gt;, otherwise
345Element FiltersElement filters can be used with a locator to refine a list of candidate elements.  They are currently used only in the 'name' element-locator.
346Filters look much like locators, ie.
347&lt;em&gt;filterType&lt;/em&gt;&lt;b&gt;=&lt;/b&gt;&lt;em&gt;argument&lt;/em&gt;Supported element-filters are:
348&lt;b&gt;value=&lt;/b&gt;&lt;em&gt;valuePattern&lt;/em&gt;
349
350Matches elements based on their values.  This is particularly useful for refining a list of similarly-named toggle-buttons.&lt;b&gt;index=&lt;/b&gt;&lt;em&gt;index&lt;/em&gt;
351
352Selects a single element based on its position in the list (offset from zero).String-match Patterns
353Various Pattern syntaxes are available for matching string values:
354
355&lt;b&gt;glob:&lt;/b&gt;&lt;em&gt;pattern&lt;/em&gt;:
356Match a string against a &quot;glob&quot; (aka &quot;wildmat&quot;) pattern. &quot;Glob&quot; is a
357kind of limited regular-expression syntax typically used in command-line
358shells. In a glob pattern, &quot;*&quot; represents any sequence of characters, and &quot;?&quot;
359represents any single character. Glob patterns match against the entire
360string.&lt;b&gt;regexp:&lt;/b&gt;&lt;em&gt;regexp&lt;/em&gt;:
361Match a string using a regular-expression. The full power of JavaScript
362regular-expressions is available.&lt;b&gt;exact:&lt;/b&gt;&lt;em&gt;string&lt;/em&gt;:
363
364Match a string exactly, verbatim, without any of that fancy wildcard
365stuff.
366
367If no pattern prefix is specified, Selenium assumes that it's a &quot;glob&quot;
368pattern.
369
370
371</pre>
372<hr width='40%' align='center'><center><h3><a name='sect16396' href='#tocsect16396'>Selenium Session</a></h3></center>
373
374<pre>
375The selenium-session record.  Nothing fancy.  All of the values
376are start-time options except session-id, which is gotten from the
377server at start time.
378
379</pre>
380<h4><a name='docfunc62238' href='#tocfunc62238'>new-selenium-session</a></h4>
381(define (new-selenium-session server-host server-port browser-start-command browser-url #!optional timeout)<i><br> ... <a href='#codefunc62238'>Full Code</a> ... )</i>
382<pre>This is so we can allow defaults and not force the session id to
383be defined.  Timeout is in seconds, and defaults to 30.
384</pre><p><br>
385
386<hr width='40%' align='center'><center><h3><a name='sect17776' href='#tocsect17776'>Internal commands</a></h3></center>
387
388<pre>
389</pre>
390<h4><a name='docfunc57818' href='#tocfunc57818'>selenium::do-command</a></h4>
391(define (selenium::do-command sel-sess verb . args)<i><br> ... <a href='#codefunc57818'>Full Code</a> ... )</i><p><br>
392
393<h4><a name='docfunc46125' href='#tocfunc46125'>selenium::get-string</a></h4>
394(define (selenium::get-string sel-sess verb . args)<i><br> ... <a href='#codefunc46125'>Full Code</a> ... )</i>
395<pre>Selenium strings start with &quot;OK,&quot;.  The rest is the string.
396</pre><p><br>
397
398<h4><a name='docfunc47386' href='#tocfunc47386'>selenium::get-number</a></h4>
399(define (selenium::get-number sel-sess verb . args)<i><br> ... <a href='#codefunc47386'>Full Code</a> ... )</i>
400<pre>Just turn the Selenium string into a number
401</pre><p><br>
402
403<h4><a name='docfunc44158' href='#tocfunc44158'>selenium::get-boolean</a></h4>
404(define (selenium::get-boolean sel-sess verb . args)<i><br> ... <a href='#codefunc44158'>Full Code</a> ... )</i>
405<pre>Selenium booleans are one of the literal strings &quot;true&quot; and
406&quot;false&quot;
407</pre><p><br>
408
409<h4><a name='docfunc303' href='#tocfunc303'>selenium::get-string-array</a></h4>
410(define (selenium::get-string-array sel-sess verb . args)<i><br> ... <a href='#codefunc303'>Full Code</a> ... )</i>
411<pre>Selenium arrays are comma-seperated strings, with \ escapes
412</pre><p><br>
413
414<h4><a name='docfunc1564' href='#tocfunc1564'>selenium::get-number-array</a></h4>
415(define (selenium::get-number-array sel-sess verb . args)<i><br> ... <a href='#codefunc1564'>Full Code</a> ... )</i>
416<pre>Just turn the array bits into numbers
417</pre><p><br>
418
419<h4><a name='docfunc1564' href='#tocfunc1564'>selenium::get-number-array</a></h4>
420(define (selenium::get-number-array sel-sess verb . args)<i><br> ... <a href='#codefunc1564'>Full Code</a> ... )</i>
421<pre>Selenium booleans are one of the literal strings &quot;true&quot; and
422&quot;false&quot;; convert all the bits
423</pre><p><br>
424
425<hr width='40%' align='center'><center><h3><a name='sect7932' href='#tocsect7932'>Starting and Stopping</a></h3></center>
426
427<pre></pre>
428<h4><a name='docfunc49990' href='#tocfunc49990'>selenium::start</a></h4>
429(define (selenium::start sel-sess)<i><br> ... <a href='#codefunc49990'>Full Code</a> ... )</i>
430<pre>Start a Selenium session (that is, launch the browser)
431</pre><p><br>
432
433<h4><a name='docfunc49376' href='#tocfunc49376'>selenium::stop</a></h4>
434(define (selenium::stop sel-sess)<i><br> ... <a href='#codefunc49376'>Full Code</a> ... )</i>
435<pre>Stop a Selenium session (that is, close the browser)
436</pre><p><br>
437
438<hr width='40%' align='center'><center><h3><a name='sect28791' href='#tocsect28791'>Generated Commands</a></h3></center>
439
440<pre></pre>
441<h4><a name='docfunc44085' href='#tocfunc44085'>selenium::click</a></h4>
442(define (selenium::click sel-sess locator)<i><br> ... <a href='#codefunc44085'>Full Code</a> ... )</i>
443<pre>Clicks on a link, button, checkbox or radio button. If the click action
444causes a new page to load (like a link usually does), call
445waitForPageToLoad.
446
447'locator' is an element locator
448</pre><p><br>
449
450<h4><a name='docfunc19315' href='#tocfunc19315'>selenium::double_click</a></h4>
451(define (selenium::double_click sel-sess locator)<i><br> ... <a href='#codefunc19315'>Full Code</a> ... )</i>
452<pre>Double clicks on a link, button, checkbox or radio button. If the double click action
453causes a new page to load (like a link usually does), call
454waitForPageToLoad.
455
456'locator' is an element locator
457</pre><p><br>
458
459<h4><a name='docfunc32663' href='#tocfunc32663'>selenium::click_at</a></h4>
460(define (selenium::click_at sel-sess locator coordString)<i><br> ... <a href='#codefunc32663'>Full Code</a> ... )</i>
461<pre>Clicks on a link, button, checkbox or radio button. If the click action
462causes a new page to load (like a link usually does), call
463waitForPageToLoad.
464
465'locator' is an element locator
466'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
467</pre><p><br>
468
469<h4><a name='docfunc44358' href='#tocfunc44358'>selenium::double_click_at</a></h4>
470(define (selenium::double_click_at sel-sess locator coordString)<i><br> ... <a href='#codefunc44358'>Full Code</a> ... )</i>
471<pre>Doubleclicks on a link, button, checkbox or radio button. If the action
472causes a new page to load (like a link usually does), call
473waitForPageToLoad.
474
475'locator' is an element locator
476'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
477</pre><p><br>
478
479<h4><a name='docfunc59930' href='#tocfunc59930'>selenium::fire_event</a></h4>
480(define (selenium::fire_event sel-sess locator eventName)<i><br> ... <a href='#codefunc59930'>Full Code</a> ... )</i>
481<pre>Explicitly simulate an event, to trigger the corresponding &quot;on&lt;em&gt;event&lt;/em&gt;&quot;
482handler.
483
484'locator' is an element locator
485'eventName' is the event name, e.g. &quot;focus&quot; or &quot;blur&quot;
486</pre><p><br>
487
488<h4><a name='docfunc34603' href='#tocfunc34603'>selenium::key_press</a></h4>
489(define (selenium::key_press sel-sess locator keySequence)<i><br> ... <a href='#codefunc34603'>Full Code</a> ... )</i>
490<pre>Simulates a user pressing and releasing a key.
491
492'locator' is an element locator
493'keySequence' is Either be a string(&quot;\&quot; followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: &quot;w&quot;, &quot;\119&quot;.
494</pre><p><br>
495
496<h4><a name='docfunc44303' href='#tocfunc44303'>selenium::shift_key_down</a></h4>
497(define (selenium::shift_key_down sel-sess)<i><br> ... <a href='#codefunc44303'>Full Code</a> ... )</i>
498<pre>Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
499
500</pre><p><br>
501
502<h4><a name='docfunc16297' href='#tocfunc16297'>selenium::shift_key_up</a></h4>
503(define (selenium::shift_key_up sel-sess)<i><br> ... <a href='#codefunc16297'>Full Code</a> ... )</i>
504<pre>Release the shift key.
505
506</pre><p><br>
507
508<h4><a name='docfunc25569' href='#tocfunc25569'>selenium::meta_key_down</a></h4>
509(define (selenium::meta_key_down sel-sess)<i><br> ... <a href='#codefunc25569'>Full Code</a> ... )</i>
510<pre>Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.
511
512</pre><p><br>
513
514<h4><a name='docfunc64883' href='#tocfunc64883'>selenium::meta_key_up</a></h4>
515(define (selenium::meta_key_up sel-sess)<i><br> ... <a href='#codefunc64883'>Full Code</a> ... )</i>
516<pre>Release the meta key.
517
518</pre><p><br>
519
520<h4><a name='docfunc19092' href='#tocfunc19092'>selenium::alt_key_down</a></h4>
521(define (selenium::alt_key_down sel-sess)<i><br> ... <a href='#codefunc19092'>Full Code</a> ... )</i>
522<pre>Press the alt key and hold it down until doAltUp() is called or a new page is loaded.
523
524</pre><p><br>
525
526<h4><a name='docfunc56621' href='#tocfunc56621'>selenium::alt_key_up</a></h4>
527(define (selenium::alt_key_up sel-sess)<i><br> ... <a href='#codefunc56621'>Full Code</a> ... )</i>
528<pre>Release the alt key.
529
530</pre><p><br>
531
532<h4><a name='docfunc12655' href='#tocfunc12655'>selenium::control_key_down</a></h4>
533(define (selenium::control_key_down sel-sess)<i><br> ... <a href='#codefunc12655'>Full Code</a> ... )</i>
534<pre>Press the control key and hold it down until doControlUp() is called or a new page is loaded.
535
536</pre><p><br>
537
538<h4><a name='docfunc50184' href='#tocfunc50184'>selenium::control_key_up</a></h4>
539(define (selenium::control_key_up sel-sess)<i><br> ... <a href='#codefunc50184'>Full Code</a> ... )</i>
540<pre>Release the control key.
541
542</pre><p><br>
543
544<h4><a name='docfunc32446' href='#tocfunc32446'>selenium::key_down</a></h4>
545(define (selenium::key_down sel-sess locator keySequence)<i><br> ... <a href='#codefunc32446'>Full Code</a> ... )</i>
546<pre>Simulates a user pressing a key (without releasing it yet).
547
548'locator' is an element locator
549'keySequence' is Either be a string(&quot;\&quot; followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: &quot;w&quot;, &quot;\119&quot;.
550</pre><p><br>
551
552<h4><a name='docfunc4440' href='#tocfunc4440'>selenium::key_up</a></h4>
553(define (selenium::key_up sel-sess locator keySequence)<i><br> ... <a href='#codefunc4440'>Full Code</a> ... )</i>
554<pre>Simulates a user releasing a key.
555
556'locator' is an element locator
557'keySequence' is Either be a string(&quot;\&quot; followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: &quot;w&quot;, &quot;\119&quot;.
558</pre><p><br>
559
560<h4><a name='docfunc1819' href='#tocfunc1819'>selenium::mouse_over</a></h4>
561(define (selenium::mouse_over sel-sess locator)<i><br> ... <a href='#codefunc1819'>Full Code</a> ... )</i>
562<pre>Simulates a user hovering a mouse over the specified element.
563
564'locator' is an element locator
565</pre><p><br>
566
567<h4><a name='docfunc37929' href='#tocfunc37929'>selenium::mouse_out</a></h4>
568(define (selenium::mouse_out sel-sess locator)<i><br> ... <a href='#codefunc37929'>Full Code</a> ... )</i>
569<pre>Simulates a user moving the mouse pointer away from the specified element.
570
571'locator' is an element locator
572</pre><p><br>
573
574<h4><a name='docfunc64545' href='#tocfunc64545'>selenium::mouse_down</a></h4>
575(define (selenium::mouse_down sel-sess locator)<i><br> ... <a href='#codefunc64545'>Full Code</a> ... )</i>
576<pre>Simulates a user pressing the mouse button (without releasing it yet) on
577the specified element.
578
579'locator' is an element locator
580</pre><p><br>
581
582<h4><a name='docfunc24053' href='#tocfunc24053'>selenium::mouse_down_at</a></h4>
583(define (selenium::mouse_down_at sel-sess locator coordString)<i><br> ... <a href='#codefunc24053'>Full Code</a> ... )</i>
584<pre>Simulates a user pressing the mouse button (without releasing it yet) at
585the specified location.
586
587'locator' is an element locator
588'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
589</pre><p><br>
590
591<h4><a name='docfunc36539' href='#tocfunc36539'>selenium::mouse_up</a></h4>
592(define (selenium::mouse_up sel-sess locator)<i><br> ... <a href='#codefunc36539'>Full Code</a> ... )</i>
593<pre>Simulates the event that occurs when the user releases the mouse button (i.e., stops
594holding the button down) on the specified element.
595
596'locator' is an element locator
597</pre><p><br>
598
599<h4><a name='docfunc61582' href='#tocfunc61582'>selenium::mouse_up_at</a></h4>
600(define (selenium::mouse_up_at sel-sess locator coordString)<i><br> ... <a href='#codefunc61582'>Full Code</a> ... )</i>
601<pre>Simulates the event that occurs when the user releases the mouse button (i.e., stops
602holding the button down) at the specified location.
603
604'locator' is an element locator
605'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
606</pre><p><br>
607
608<h4><a name='docfunc62249' href='#tocfunc62249'>selenium::mouse_move</a></h4>
609(define (selenium::mouse_move sel-sess locator)<i><br> ... <a href='#codefunc62249'>Full Code</a> ... )</i>
610<pre>Simulates a user pressing the mouse button (without releasing it yet) on
611the specified element.
612
613'locator' is an element locator
614</pre><p><br>
615
616<h4><a name='docfunc21757' href='#tocfunc21757'>selenium::mouse_move_at</a></h4>
617(define (selenium::mouse_move_at sel-sess locator coordString)<i><br> ... <a href='#codefunc21757'>Full Code</a> ... )</i>
618<pre>Simulates a user pressing the mouse button (without releasing it yet) on
619the specified element.
620
621'locator' is an element locator
622'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
623</pre><p><br>
624
625<h4><a name='docfunc47842' href='#tocfunc47842'>selenium::type</a></h4>
626(define (selenium::type sel-sess locator value)<i><br> ... <a href='#codefunc47842'>Full Code</a> ... )</i>
627<pre>Sets the value of an input field, as though you typed it in.
628
629Can also be used to set the value of combo boxes, check boxes, etc. In these cases,
630value should be the value of the option selected, not the visible text.
631
632
633'locator' is an element locator
634'value' is the value to type
635</pre><p><br>
636
637<h4><a name='docfunc40986' href='#tocfunc40986'>selenium::type_keys</a></h4>
638(define (selenium::type_keys sel-sess locator value)<i><br> ... <a href='#codefunc40986'>Full Code</a> ... )</i>
639<pre>Simulates keystroke events on the specified element, as though you typed the value key-by-key.
640
641This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string;
642this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.
643Unlike the simple &quot;type&quot; command, which forces the specified value into the page directly, this command
644may or may not have any visible effect, even in cases where typing keys would normally have a visible effect.
645For example, if you use &quot;typeKeys&quot; on a form element, you may or may not see the results of what you typed in
646the field.
647In some cases, you may need to use the simple &quot;type&quot; command to set the value of the field and then the &quot;typeKeys&quot; command to
648send the keystroke events corresponding to what you just typed.
649
650
651'locator' is an element locator
652'value' is the value to type
653</pre><p><br>
654
655<h4><a name='docfunc30498' href='#tocfunc30498'>selenium::set_speed</a></h4>
656(define (selenium::set_speed sel-sess value)<i><br> ... <a href='#codefunc30498'>Full Code</a> ... )</i>
657<pre>Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation).  By default, there is no such delay, i.e.,
658the delay is 0 milliseconds.
659
660'value' is the number of milliseconds to pause after operation
661</pre><p><br>
662
663<h4><a name='docfunc30486' href='#tocfunc30486'>selenium::get_speed</a></h4>
664(define (selenium::get_speed sel-sess)<i><br> ... <a href='#codefunc30486'>Full Code</a> ... )</i>
665<pre>Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).  By default, there is no such delay, i.e.,
666the delay is 0 milliseconds.
667
668See also setSpeed.
669
670</pre><p><br>
671
672<h4><a name='docfunc43057' href='#tocfunc43057'>selenium::check</a></h4>
673(define (selenium::check sel-sess locator)<i><br> ... <a href='#codefunc43057'>Full Code</a> ... )</i>
674<pre>Check a toggle-button (checkbox/radio)
675
676'locator' is an element locator
677</pre><p><br>
678
679<h4><a name='docfunc5799' href='#tocfunc5799'>selenium::uncheck</a></h4>
680(define (selenium::uncheck sel-sess locator)<i><br> ... <a href='#codefunc5799'>Full Code</a> ... )</i>
681<pre>Uncheck a toggle-button (checkbox/radio)
682
683'locator' is an element locator
684</pre><p><br>
685
686<h4><a name='docfunc6977' href='#tocfunc6977'>selenium::select</a></h4>
687(define (selenium::select sel-sess selectLocator optionLocator)<i><br> ... <a href='#codefunc6977'>Full Code</a> ... )</i>
688<pre>Select an option from a drop-down using an option locator.
689
690
691Option locators provide different ways of specifying options of an HTML
692Select element (e.g. for selecting a specific option, or for asserting
693that the selected option satisfies a specification). There are several
694forms of Select Option Locator.
695
696&lt;b&gt;label&lt;/b&gt;=&lt;em&gt;labelPattern&lt;/em&gt;:
697matches options based on their labels, i.e. the visible text. (This
698is the default.)
699label=regexp:^[Oo]ther
700&lt;b&gt;value&lt;/b&gt;=&lt;em&gt;valuePattern&lt;/em&gt;:
701matches options based on their values.
702value=other
703&lt;b&gt;id&lt;/b&gt;=&lt;em&gt;id&lt;/em&gt;:
704
705matches options based on their ids.
706id=option1
707&lt;b&gt;index&lt;/b&gt;=&lt;em&gt;index&lt;/em&gt;:
708matches an option based on its index (offset from zero).
709index=2
710
711
712If no option locator prefix is provided, the default behaviour is to match on &lt;b&gt;label&lt;/b&gt;.
713
714
715
716'selectLocator' is an element locator identifying a drop-down menu
717'optionLocator' is an option locator (a label by default)
718</pre><p><br>
719
720<h4><a name='docfunc20190' href='#tocfunc20190'>selenium::add_selection</a></h4>
721(define (selenium::add_selection sel-sess locator optionLocator)<i><br> ... <a href='#codefunc20190'>Full Code</a> ... )</i>
722<pre>Add a selection to the set of selected options in a multi-select element using an option locator.
723
724@see #doSelect for details of option locators
725
726'locator' is an element locator identifying a multi-select box
727'optionLocator' is an option locator (a label by default)
728</pre><p><br>
729
730<h4><a name='docfunc12642' href='#tocfunc12642'>selenium::remove_selection</a></h4>
731(define (selenium::remove_selection sel-sess locator optionLocator)<i><br> ... <a href='#codefunc12642'>Full Code</a> ... )</i>
732<pre>Remove a selection from the set of selected options in a multi-select element using an option locator.
733
734@see #doSelect for details of option locators
735
736'locator' is an element locator identifying a multi-select box
737'optionLocator' is an option locator (a label by default)
738</pre><p><br>
739
740<h4><a name='docfunc65440' href='#tocfunc65440'>selenium::remove_all_selections</a></h4>
741(define (selenium::remove_all_selections sel-sess locator)<i><br> ... <a href='#codefunc65440'>Full Code</a> ... )</i>
742<pre>Unselects all of the selected options in a multi-select element.
743
744'locator' is an element locator identifying a multi-select box
745</pre><p><br>
746
747<h4><a name='docfunc13117' href='#tocfunc13117'>selenium::submit</a></h4>
748(define (selenium::submit sel-sess formLocator)<i><br> ... <a href='#codefunc13117'>Full Code</a> ... )</i>
749<pre>Submit the specified form. This is particularly useful for forms without
750submit buttons, e.g. single-input &quot;Search&quot; forms.
751
752'formLocator' is an element locator for the form you want to submit
753</pre><p><br>
754
755<h4><a name='docfunc47826' href='#tocfunc47826'>selenium::open</a></h4>
756(define (selenium::open sel-sess url)<i><br> ... <a href='#codefunc47826'>Full Code</a> ... )</i>
757<pre>Opens an URL in the test frame. This accepts both relative and absolute
758URLs.
759
760The &quot;open&quot; command waits for the page to load before proceeding,
761ie. the &quot;AndWait&quot; suffix is implicit.
762
763&lt;em&gt;Note&lt;/em&gt;: The URL must be on the same domain as the runner HTML
764due to security restrictions in the browser (Same Origin Policy). If you
765need to open an URL on another domain, use the Selenium Server to start a
766new browser session on that domain.
767
768'url' is the URL to open; may be relative or absolute
769</pre><p><br>
770
771<h4><a name='docfunc4215' href='#tocfunc4215'>selenium::open_window</a></h4>
772(define (selenium::open_window sel-sess url windowID)<i><br> ... <a href='#codefunc4215'>Full Code</a> ... )</i>
773<pre>Opens a popup window (if a window with that ID isn't already open).
774After opening the window, you'll need to select it using the selectWindow
775command.
776
777This command can also be a useful workaround for bug SEL-339.  In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the &quot;onLoad&quot; event, for example).
778In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using
779an empty (blank) url, like this: openWindow(&quot;&quot;, &quot;myFunnyWindow&quot;).
780
781
782'url' is the URL to open, which can be blank
783'windowID' is the JavaScript window ID of the window to select
784</pre><p><br>
785
786<h4><a name='docfunc28901' href='#tocfunc28901'>selenium::select_window</a></h4>
787(define (selenium::select_window sel-sess windowID)<i><br> ... <a href='#codefunc28901'>Full Code</a> ... )</i>
788<pre>Selects a popup window; once a popup window has been selected, all
789commands go to that window. To select the main window again, use null
790as the target.
791
792Note that there is a big difference between a window's internal JavaScript &quot;name&quot; property
793and the &quot;title&quot; of a given window's document (which is normally what you actually see, as an end user,
794in the title bar of the window).  The &quot;name&quot; is normally invisible to the end-user; it's the second
795parameter &quot;windowName&quot; passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag)
796(which selenium intercepts).
797Selenium has several strategies for finding the window object referred to by the &quot;windowID&quot; parameter.
7981.) if windowID is null, (or the string &quot;null&quot;) then it is assumed the user is referring to the original window instantiated by the browser).
7992.) if the value of the &quot;windowID&quot; parameter is a JavaScript variable name in the current application window, then it is assumed
800that this variable contains the return value from a call to the JavaScript window.open() method.
8013.) Otherwise, selenium looks in a hash it maintains that maps string names to window &quot;names&quot;.
8024.) If &lt;em&gt;that&lt;/em&gt; fails, we'll try looping over all of the known windows to try to find the appropriate &quot;title&quot;.
803Since &quot;title&quot; is not necessarily unique, this may have unexpected behavior.
804If you're having trouble figuring out what is the name of a window that you want to manipulate, look at the selenium log messages
805which identify the names of windows created via window.open (and therefore intercepted by selenium).  You will see messages
806like the following for each window as it is opened:
807&lt;tt&gt;debug: window.open call intercepted; window ID (which you can use with selectWindow()) is &quot;myNewWindow&quot;&lt;/tt&gt;
808In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the &quot;onLoad&quot; event, for example).
809(This is bug SEL-339.)  In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using
810an empty (blank) url, like this: openWindow(&quot;&quot;, &quot;myFunnyWindow&quot;).
811
812
813'windowID' is the JavaScript window ID of the window to select
814</pre><p><br>
815
816<h4><a name='docfunc18560' href='#tocfunc18560'>selenium::select_frame</a></h4>
817(define (selenium::select_frame sel-sess locator)<i><br> ... <a href='#codefunc18560'>Full Code</a> ... )</i>
818<pre>Selects a frame within the current window.  (You may invoke this command
819multiple times to select nested frames.)  To select the parent frame, use
820&quot;relative=parent&quot; as a locator; to select the top frame, use &quot;relative=top&quot;.
821You can also select a frame by its 0-based index number; select the first frame with
822&quot;index=0&quot;, or the third frame with &quot;index=2&quot;.
823
824You may also use a DOM expression to identify the frame you want directly,
825like this: &lt;tt&gt;dom=frames[&quot;main&quot;].frames[&quot;subframe&quot;]&lt;/tt&gt;
826
827
828'locator' is an element locator identifying a frame or iframe
829</pre><p><br>
830
831<h4><a name='docfunc57766' href='#tocfunc57766'>selenium::get_whether_this_frame_match_frame_expression</a></h4>
832(define (selenium::get_whether_this_frame_match_frame_expression sel-sess currentFrameString target)<i><br> ... <a href='#codefunc57766'>Full Code</a> ... )</i>
833<pre>Determine whether current/locator identify the frame containing this running code.
834
835This is useful in proxy injection mode, where this code runs in every
836browser frame and window, and sometimes the selenium server needs to identify
837the &quot;current&quot; frame.  In this case, when the test calls selectFrame, this
838routine is called for each frame to figure out which one has been selected.
839The selected frame will return true, while all others will return false.
840
841
842'currentFrameString' is starting frame
843'target' is new frame (which might be relative to the current one)
844</pre><p><br>
845
846<h4><a name='docfunc23368' href='#tocfunc23368'>selenium::get_whether_this_window_match_window_expression</a></h4>
847(define (selenium::get_whether_this_window_match_window_expression sel-sess currentWindowString target)<i><br> ... <a href='#codefunc23368'>Full Code</a> ... )</i>
848<pre>Determine whether currentWindowString plus target identify the window containing this running code.
849
850This is useful in proxy injection mode, where this code runs in every
851browser frame and window, and sometimes the selenium server needs to identify
852the &quot;current&quot; window.  In this case, when the test calls selectWindow, this
853routine is called for each window to figure out which one has been selected.
854The selected window will return true, while all others will return false.
855
856
857'currentWindowString' is starting window
858'target' is new window (which might be relative to the current one, e.g., &quot;_parent&quot;)
859</pre><p><br>
860
861<h4><a name='docfunc57675' href='#tocfunc57675'>selenium::wait_for_pop_up</a></h4>
862(define (selenium::wait_for_pop_up sel-sess windowID timeout)<i><br> ... <a href='#codefunc57675'>Full Code</a> ... )</i>
863<pre>Waits for a popup window to appear and load up.
864
865'windowID' is the JavaScript window ID of the window that will appear
866'timeout' is a timeout in milliseconds, after which the action will return with an error
867</pre><p><br>
868
869<h4><a name='docfunc58889' href='#tocfunc58889'>selenium::choose_cancel_on_next_confirmation</a></h4>
870(define (selenium::choose_cancel_on_next_confirmation sel-sess)<i><br> ... <a href='#codefunc58889'>Full Code</a> ... )</i>
871<pre>By default, Selenium's overridden window.confirm() function will
872return true, as if the user had manually clicked OK; after running
873this command, the next call to confirm() will return false, as if
874the user had clicked Cancel.  Selenium will then resume using the
875default behavior for future confirmations, automatically returning
876true (OK) unless/until you explicitly call this command for each
877confirmation.
878
879</pre><p><br>
880
881<h4><a name='docfunc7748' href='#tocfunc7748'>selenium::choose_ok_on_next_confirmation</a></h4>
882(define (selenium::choose_ok_on_next_confirmation sel-sess)<i><br> ... <a href='#codefunc7748'>Full Code</a> ... )</i>
883<pre>Undo the effect of calling chooseCancelOnNextConfirmation.  Note
884that Selenium's overridden window.confirm() function will normally automatically
885return true, as if the user had manually clicked OK, so you shouldn't
886need to use this command unless for some reason you need to change
887your mind prior to the next confirmation.  After any confirmation, Selenium will resume using the
888default behavior for future confirmations, automatically returning
889true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each
890confirmation.
891
892</pre><p><br>
893
894<h4><a name='docfunc11680' href='#tocfunc11680'>selenium::answer_on_next_prompt</a></h4>
895(define (selenium::answer_on_next_prompt sel-sess answer)<i><br> ... <a href='#codefunc11680'>Full Code</a> ... )</i>
896<pre>Instructs Selenium to return the specified answer string in response to
897the next JavaScript prompt [window.prompt()].
898
899'answer' is the answer to give in response to the prompt pop-up
900</pre><p><br>
901
902<h4><a name='docfunc4497' href='#tocfunc4497'>selenium::go_back</a></h4>
903(define (selenium::go_back sel-sess)<i><br> ... <a href='#codefunc4497'>Full Code</a> ... )</i>
904<pre>Simulates the user clicking the &quot;back&quot; button on their browser.
905
906</pre><p><br>
907
908<h4><a name='docfunc10148' href='#tocfunc10148'>selenium::refresh</a></h4>
909(define (selenium::refresh sel-sess)<i><br> ... <a href='#codefunc10148'>Full Code</a> ... )</i>
910<pre>Simulates the user clicking the &quot;Refresh&quot; button on their browser.
911
912</pre><p><br>
913
914<h4><a name='docfunc48181' href='#tocfunc48181'>selenium::close</a></h4>
915(define (selenium::close sel-sess)<i><br> ... <a href='#codefunc48181'>Full Code</a> ... )</i>
916<pre>Simulates the user clicking the &quot;close&quot; button in the titlebar of a popup
917window or tab.
918
919</pre><p><br>
920
921<h4><a name='docfunc14937' href='#tocfunc14937'>selenium::is_alert_present</a></h4>
922(define (selenium::is_alert_present sel-sess)<i><br> ... <a href='#codefunc14937'>Full Code</a> ... )</i>
923<pre>Has an alert occurred?
924
925
926This function never throws an exception
927
928
929
930</pre><p><br>
931
932<h4><a name='docfunc21450' href='#tocfunc21450'>selenium::is_prompt_present</a></h4>
933(define (selenium::is_prompt_present sel-sess)<i><br> ... <a href='#codefunc21450'>Full Code</a> ... )</i>
934<pre>Has a prompt occurred?
935
936
937This function never throws an exception
938
939
940
941</pre><p><br>
942
943<h4><a name='docfunc36855' href='#tocfunc36855'>selenium::is_confirmation_present</a></h4>
944(define (selenium::is_confirmation_present sel-sess)<i><br> ... <a href='#codefunc36855'>Full Code</a> ... )</i>
945<pre>Has confirm() been called?
946
947
948This function never throws an exception
949
950
951
952</pre><p><br>
953
954<h4><a name='docfunc32788' href='#tocfunc32788'>selenium::get_alert</a></h4>
955(define (selenium::get_alert sel-sess)<i><br> ... <a href='#codefunc32788'>Full Code</a> ... )</i>
956<pre>Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
957
958Getting an alert has the same effect as manually clicking OK. If an
959alert is generated but you do not get/verify it, the next Selenium action
960will fail.
961NOTE: under Selenium, JavaScript alerts will NOT pop up a visible alert
962dialog.
963NOTE: Selenium does NOT support JavaScript alerts that are generated in a
964page's onload() event handler. In this case a visible dialog WILL be
965generated and Selenium will hang until someone manually clicks OK.
966
967
968</pre><p><br>
969
970<h4><a name='docfunc8806' href='#tocfunc8806'>selenium::get_confirmation</a></h4>
971(define (selenium::get_confirmation sel-sess)<i><br> ... <a href='#codefunc8806'>Full Code</a> ... )</i>
972<pre>Retrieves the message of a JavaScript confirmation dialog generated during
973the previous action.
974
975
976By default, the confirm function will return true, having the same effect
977as manually clicking OK. This can be changed by prior execution of the
978chooseCancelOnNextConfirmation command. If an confirmation is generated
979but you do not get/verify it, the next Selenium action will fail.
980
981
982NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible
983dialog.
984
985
986NOTE: Selenium does NOT support JavaScript confirmations that are
987generated in a page's onload() event handler. In this case a visible
988dialog WILL be generated and Selenium will hang until you manually click
989OK.
990
991
992
993</pre><p><br>
994
995<h4><a name='docfunc62761' href='#tocfunc62761'>selenium::get_prompt</a></h4>
996(define (selenium::get_prompt sel-sess)<i><br> ... <a href='#codefunc62761'>Full Code</a> ... )</i>
997<pre>Retrieves the message of a JavaScript question prompt dialog generated during
998the previous action.
999
1000Successful handling of the prompt requires prior execution of the
1001answerOnNextPrompt command. If a prompt is generated but you
1002do not get/verify it, the next Selenium action will fail.
1003NOTE: under Selenium, JavaScript prompts will NOT pop up a visible
1004dialog.
1005NOTE: Selenium does NOT support JavaScript prompts that are generated in a
1006page's onload() event handler. In this case a visible dialog WILL be
1007generated and Selenium will hang until someone manually clicks OK.
1008
1009
1010</pre><p><br>
1011
1012<h4><a name='docfunc18829' href='#tocfunc18829'>selenium::get_location</a></h4>
1013(define (selenium::get_location sel-sess)<i><br> ... <a href='#codefunc18829'>Full Code</a> ... )</i>
1014<pre>Gets the absolute URL of the current page.
1015
1016</pre><p><br>
1017
1018<h4><a name='docfunc30503' href='#tocfunc30503'>selenium::get_title</a></h4>
1019(define (selenium::get_title sel-sess)<i><br> ... <a href='#codefunc30503'>Full Code</a> ... )</i>
1020<pre>Gets the title of the current page.
1021
1022</pre><p><br>
1023
1024<h4><a name='docfunc30425' href='#tocfunc30425'>selenium::get_body_text</a></h4>
1025(define (selenium::get_body_text sel-sess)<i><br> ... <a href='#codefunc30425'>Full Code</a> ... )</i>
1026<pre>Gets the entire text of the page.
1027
1028</pre><p><br>
1029
1030<h4><a name='docfunc30753' href='#tocfunc30753'>selenium::get_value</a></h4>
1031(define (selenium::get_value sel-sess locator)<i><br> ... <a href='#codefunc30753'>Full Code</a> ... )</i>
1032<pre>Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
1033For checkbox/radio elements, the value will be &quot;on&quot; or &quot;off&quot; depending on
1034whether the element is checked or not.
1035
1036'locator' is an element locator
1037</pre><p><br>
1038
1039<h4><a name='docfunc31430' href='#tocfunc31430'>selenium::get_text</a></h4>
1040(define (selenium::get_text sel-sess locator)<i><br> ... <a href='#codefunc31430'>Full Code</a> ... )</i>
1041<pre>Gets the text of an element. This works for any element that contains
1042text. This command uses either the textContent (Mozilla-like browsers) or
1043the innerText (IE-like browsers) of the element, which is the rendered
1044text shown to the user.
1045
1046'locator' is an element locator
1047</pre><p><br>
1048
1049<h4><a name='docfunc32789' href='#tocfunc32789'>selenium::highlight</a></h4>
1050(define (selenium::highlight sel-sess locator)<i><br> ... <a href='#codefunc32789'>Full Code</a> ... )</i>
1051<pre>Briefly changes the backgroundColor of the specified element yellow.  Useful for debugging.
1052
1053'locator' is an element locator
1054</pre><p><br>
1055
1056<h4><a name='docfunc33696' href='#tocfunc33696'>selenium::get_eval</a></h4>
1057(define (selenium::get_eval sel-sess script)<i><br> ... <a href='#codefunc33696'>Full Code</a> ... )</i>
1058<pre>Gets the result of evaluating the specified JavaScript snippet.  The snippet may
1059have multiple lines, but only the result of the last line will be returned.
1060
1061Note that, by default, the snippet will run in the context of the &quot;selenium&quot;
1062object itself, so &lt;tt&gt;this&lt;/tt&gt; will refer to the Selenium object.  Use &lt;tt&gt;window&lt;/tt&gt; to
1063refer to the window of your application, e.g. &lt;tt&gt;window.document.getElementById('foo')&lt;/tt&gt;
1064If you need to use
1065a locator to refer to a single element in your application page, you can
1066use &lt;tt&gt;this.browserbot.findElement(&quot;id=foo&quot;)&lt;/tt&gt; where &quot;id=foo&quot; is your locator.
1067
1068
1069'script' is the JavaScript snippet to run
1070</pre><p><br>
1071
1072<h4><a name='docfunc59383' href='#tocfunc59383'>selenium::is_checked</a></h4>
1073(define (selenium::is_checked sel-sess locator)<i><br> ... <a href='#codefunc59383'>Full Code</a> ... )</i>
1074<pre>Gets whether a toggle-button (checkbox/radio) is checked.  Fails if the specified element doesn't exist or isn't a toggle-button.
1075
1076'locator' is an element locator pointing to a checkbox or radio button
1077</pre><p><br>
1078
1079<h4><a name='docfunc28437' href='#tocfunc28437'>selenium::get_table</a></h4>
1080(define (selenium::get_table sel-sess tableCellAddress)<i><br> ... <a href='#codefunc28437'>Full Code</a> ... )</i>
1081<pre>Gets the text from a cell of a table. The cellAddress syntax
1082tableLocator.row.column, where row and column start at 0.
1083
1084'tableCellAddress' is a cell address, e.g. &quot;foo.1.4&quot;
1085</pre><p><br>
1086
1087<h4><a name='docfunc32795' href='#tocfunc32795'>selenium::get_selected_labels</a></h4>
1088(define (selenium::get_selected_labels sel-sess selectLocator)<i><br> ... <a href='#codefunc32795'>Full Code</a> ... )</i>
1089<pre>Gets all option labels (visible text) for selected options in the specified select or multi-select element.
1090
1091'selectLocator' is an element locator identifying a drop-down menu
1092</pre><p><br>
1093
1094<h4><a name='docfunc32680' href='#tocfunc32680'>selenium::get_selected_label</a></h4>
1095(define (selenium::get_selected_label sel-sess selectLocator)<i><br> ... <a href='#codefunc32680'>Full Code</a> ... )</i>
1096<pre>Gets option label (visible text) for selected option in the specified select element.
1097
1098'selectLocator' is an element locator identifying a drop-down menu
1099</pre><p><br>
1100
1101<h4><a name='docfunc36139' href='#tocfunc36139'>selenium::get_selected_values</a></h4>
1102(define (selenium::get_selected_values sel-sess selectLocator)<i><br> ... <a href='#codefunc36139'>Full Code</a> ... )</i>
1103<pre>Gets all option values (value attributes) for selected options in the specified select or multi-select element.
1104
1105'selectLocator' is an element locator identifying a drop-down menu
1106</pre><p><br>
1107
1108<h4><a name='docfunc36024' href='#tocfunc36024'>selenium::get_selected_value</a></h4>
1109(define (selenium::get_selected_value sel-sess selectLocator)<i><br> ... <a href='#codefunc36024'>Full Code</a> ... )</i>
1110<pre>Gets option value (value attribute) for selected option in the specified select element.
1111
1112'selectLocator' is an element locator identifying a drop-down menu
1113</pre><p><br>
1114
1115<h4><a name='docfunc65050' href='#tocfunc65050'>selenium::get_selected_indexes</a></h4>
1116(define (selenium::get_selected_indexes sel-sess selectLocator)<i><br> ... <a href='#codefunc65050'>Full Code</a> ... )</i>
1117<pre>Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
1118
1119'selectLocator' is an element locator identifying a drop-down menu
1120</pre><p><br>
1121
1122<h4><a name='docfunc35509' href='#tocfunc35509'>selenium::get_selected_index</a></h4>
1123(define (selenium::get_selected_index sel-sess selectLocator)<i><br> ... <a href='#codefunc35509'>Full Code</a> ... )</i>
1124<pre>Gets option index (option number, starting at 0) for selected option in the specified select element.
1125
1126'selectLocator' is an element locator identifying a drop-down menu
1127</pre><p><br>
1128
1129<h4><a name='docfunc8518' href='#tocfunc8518'>selenium::get_selected_ids</a></h4>
1130(define (selenium::get_selected_ids sel-sess selectLocator)<i><br> ... <a href='#codefunc8518'>Full Code</a> ... )</i>
1131<pre>Gets all option element IDs for selected options in the specified select or multi-select element.
1132
1133'selectLocator' is an element locator identifying a drop-down menu
1134</pre><p><br>
1135
1136<h4><a name='docfunc44613' href='#tocfunc44613'>selenium::get_selected_id</a></h4>
1137(define (selenium::get_selected_id sel-sess selectLocator)<i><br> ... <a href='#codefunc44613'>Full Code</a> ... )</i>
1138<pre>Gets option element ID for selected option in the specified select element.
1139
1140'selectLocator' is an element locator identifying a drop-down menu
1141</pre><p><br>
1142
1143<h4><a name='docfunc7797' href='#tocfunc7797'>selenium::is_something_selected</a></h4>
1144(define (selenium::is_something_selected sel-sess selectLocator)<i><br> ... <a href='#codefunc7797'>Full Code</a> ... )</i>
1145<pre>Determines whether some option in a drop-down menu is selected.
1146
1147'selectLocator' is an element locator identifying a drop-down menu
1148</pre><p><br>
1149
1150<h4><a name='docfunc42692' href='#tocfunc42692'>selenium::get_select_options</a></h4>
1151(define (selenium::get_select_options sel-sess selectLocator)<i><br> ... <a href='#codefunc42692'>Full Code</a> ... )</i>
1152<pre>Gets all option labels in the specified select drop-down.
1153
1154'selectLocator' is an element locator identifying a drop-down menu
1155</pre><p><br>
1156
1157<h4><a name='docfunc24307' href='#tocfunc24307'>selenium::get_attribute</a></h4>
1158(define (selenium::get_attribute sel-sess attributeLocator)<i><br> ... <a href='#codefunc24307'>Full Code</a> ... )</i>
1159<pre>Gets the value of an element attribute.
1160
1161'attributeLocator' is an element locator followed by an @ sign and then the name of the attribute, e.g. &quot;foo@bar&quot;
1162</pre><p><br>
1163
1164<h4><a name='docfunc61519' href='#tocfunc61519'>selenium::is_text_present</a></h4>
1165(define (selenium::is_text_present sel-sess pattern)<i><br> ... <a href='#codefunc61519'>Full Code</a> ... )</i>
1166<pre>Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
1167
1168'pattern' is a pattern to match with the text of the page
1169</pre><p><br>
1170
1171<h4><a name='docfunc41922' href='#tocfunc41922'>selenium::is_element_present</a></h4>
1172(define (selenium::is_element_present sel-sess locator)<i><br> ... <a href='#codefunc41922'>Full Code</a> ... )</i>
1173<pre>Verifies that the specified element is somewhere on the page.
1174
1175'locator' is an element locator
1176</pre><p><br>
1177
1178<h4><a name='docfunc262' href='#tocfunc262'>selenium::is_visible</a></h4>
1179(define (selenium::is_visible sel-sess locator)<i><br> ... <a href='#codefunc262'>Full Code</a> ... )</i>
1180<pre>Determines if the specified element is visible. An
1181element can be rendered invisible by setting the CSS &quot;visibility&quot;
1182property to &quot;hidden&quot;, or the &quot;display&quot; property to &quot;none&quot;, either for the
1183element itself or one if its ancestors.  This method will fail if
1184the element is not present.
1185
1186'locator' is an element locator
1187</pre><p><br>
1188
1189<h4><a name='docfunc60518' href='#tocfunc60518'>selenium::is_editable</a></h4>
1190(define (selenium::is_editable sel-sess locator)<i><br> ... <a href='#codefunc60518'>Full Code</a> ... )</i>
1191<pre>Determines whether the specified input element is editable, ie hasn't been disabled.
1192This method will fail if the specified element isn't an input element.
1193
1194'locator' is an element locator
1195</pre><p><br>
1196
1197<h4><a name='docfunc50528' href='#tocfunc50528'>selenium::get_all_buttons</a></h4>
1198(define (selenium::get_all_buttons sel-sess)<i><br> ... <a href='#codefunc50528'>Full Code</a> ... )</i>
1199<pre>Returns the IDs of all buttons on the page.
1200
1201If a given button has no ID, it will appear as &quot;&quot; in this array.
1202
1203
1204</pre><p><br>
1205
1206<h4><a name='docfunc16885' href='#tocfunc16885'>selenium::get_all_links</a></h4>
1207(define (selenium::get_all_links sel-sess)<i><br> ... <a href='#codefunc16885'>Full Code</a> ... )</i>
1208<pre>Returns the IDs of all links on the page.
1209
1210If a given link has no ID, it will appear as &quot;&quot; in this array.
1211
1212
1213</pre><p><br>
1214
1215<h4><a name='docfunc46551' href='#tocfunc46551'>selenium::get_all_fields</a></h4>
1216(define (selenium::get_all_fields sel-sess)<i><br> ... <a href='#codefunc46551'>Full Code</a> ... )</i>
1217<pre>Returns the IDs of all input fields on the page.
1218
1219If a given field has no ID, it will appear as &quot;&quot; in this array.
1220
1221
1222</pre><p><br>
1223
1224<h4><a name='docfunc13370' href='#tocfunc13370'>selenium::get_attribute_from_all_windows</a></h4>
1225(define (selenium::get_attribute_from_all_windows sel-sess attributeName)<i><br> ... <a href='#codefunc13370'>Full Code</a> ... )</i>
1226<pre>Returns every instance of some attribute from all known windows.
1227
1228'attributeName' is name of an attribute on the windows
1229</pre><p><br>
1230
1231<h4><a name='docfunc39063' href='#tocfunc39063'>selenium::dragdrop</a></h4>
1232(define (selenium::dragdrop sel-sess locator movementsString)<i><br> ... <a href='#codefunc39063'>Full Code</a> ... )</i>
1233<pre>deprecated - use dragAndDrop instead
1234
1235'locator' is an element locator
1236'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., &quot;+70,-300&quot;
1237</pre><p><br>
1238
1239<h4><a name='docfunc47466' href='#tocfunc47466'>selenium::set_mouse_speed</a></h4>
1240(define (selenium::set_mouse_speed sel-sess pixels)<i><br> ... <a href='#codefunc47466'>Full Code</a> ... )</i>
1241<pre>Configure the number of pixels between &quot;mousemove&quot; events during dragAndDrop commands (default=10).
1242Setting this value to 0 means that we'll send a &quot;mousemove&quot; event to every single pixel
1243in between the start location and the end location; that can be very slow, and may
1244cause some browsers to force the JavaScript to timeout.
1245If the mouse speed is greater than the distance between the two dragged objects, we'll
1246just send one &quot;mousemove&quot; at the start location and then one final one at the end location.
1247
1248
1249'pixels' is the number of pixels between &quot;mousemove&quot; events
1250</pre><p><br>
1251
1252<h4><a name='docfunc47454' href='#tocfunc47454'>selenium::get_mouse_speed</a></h4>
1253(define (selenium::get_mouse_speed sel-sess)<i><br> ... <a href='#codefunc47454'>Full Code</a> ... )</i>
1254<pre>Returns the number of pixels between &quot;mousemove&quot; events during dragAndDrop commands (default=10).
1255
1256</pre><p><br>
1257
1258<h4><a name='docfunc20435' href='#tocfunc20435'>selenium::drag_and_drop</a></h4>
1259(define (selenium::drag_and_drop sel-sess locator movementsString)<i><br> ... <a href='#codefunc20435'>Full Code</a> ... )</i>
1260<pre>Drags an element a certain distance and then drops it
1261
1262'locator' is an element locator
1263'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., &quot;+70,-300&quot;
1264</pre><p><br>
1265
1266<h4><a name='docfunc23523' href='#tocfunc23523'>selenium::drag_and_drop_to_object</a></h4>
1267(define (selenium::drag_and_drop_to_object sel-sess locatorOfObjectToBeDragged locatorOfDragDestinationObject)<i><br> ... <a href='#codefunc23523'>Full Code</a> ... )</i>
1268<pre>Drags an element and drops it on another element
1269
1270'locatorOfObjectToBeDragged' is an element to be dragged
1271'locatorOfDragDestinationObject' is an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged  is dropped
1272</pre><p><br>
1273
1274<h4><a name='docfunc24215' href='#tocfunc24215'>selenium::window_focus</a></h4>
1275(define (selenium::window_focus sel-sess)<i><br> ... <a href='#codefunc24215'>Full Code</a> ... )</i>
1276<pre>Gives focus to the currently selected window
1277
1278</pre><p><br>
1279
1280<h4><a name='docfunc61259' href='#tocfunc61259'>selenium::window_maximize</a></h4>
1281(define (selenium::window_maximize sel-sess)<i><br> ... <a href='#codefunc61259'>Full Code</a> ... )</i>
1282<pre>Resize currently selected window to take up the entire screen
1283
1284</pre><p><br>
1285
1286<h4><a name='docfunc36544' href='#tocfunc36544'>selenium::get_all_window_ids</a></h4>
1287(define (selenium::get_all_window_ids sel-sess)<i><br> ... <a href='#codefunc36544'>Full Code</a> ... )</i>
1288<pre>Returns the IDs of all windows that the browser knows about.
1289
1290</pre><p><br>
1291
1292<h4><a name='docfunc291' href='#tocfunc291'>selenium::get_all_window_names</a></h4>
1293(define (selenium::get_all_window_names sel-sess)<i><br> ... <a href='#codefunc291'>Full Code</a> ... )</i>
1294<pre>Returns the names of all windows that the browser knows about.
1295
1296</pre><p><br>
1297
1298<h4><a name='docfunc165' href='#tocfunc165'>selenium::get_all_window_titles</a></h4>
1299(define (selenium::get_all_window_titles sel-sess)<i><br> ... <a href='#codefunc165'>Full Code</a> ... )</i>
1300<pre>Returns the titles of all windows that the browser knows about.
1301
1302</pre><p><br>
1303
1304<h4><a name='docfunc52821' href='#tocfunc52821'>selenium::get_html_source</a></h4>
1305(define (selenium::get_html_source sel-sess)<i><br> ... <a href='#codefunc52821'>Full Code</a> ... )</i>
1306<pre>Returns the entire HTML source between the opening and
1307closing &quot;html&quot; tags.
1308
1309</pre><p><br>
1310
1311<h4><a name='docfunc50234' href='#tocfunc50234'>selenium::set_cursor_position</a></h4>
1312(define (selenium::set_cursor_position sel-sess locator position)<i><br> ... <a href='#codefunc50234'>Full Code</a> ... )</i>
1313<pre>Moves the text cursor to the specified position in the given input element or textarea.
1314This method will fail if the specified element isn't an input element or textarea.
1315
1316'locator' is an element locator pointing to an input element or textarea
1317'position' is the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field.  You can also set the cursor to -1 to move it to the end of the field.
1318</pre><p><br>
1319
1320<h4><a name='docfunc7364' href='#tocfunc7364'>selenium::get_element_index</a></h4>
1321(define (selenium::get_element_index sel-sess locator)<i><br> ... <a href='#codefunc7364'>Full Code</a> ... )</i>
1322<pre>Get the relative index of an element to its parent (starting from 0). The comment node and empty text node
1323will be ignored.
1324
1325'locator' is an element locator pointing to an element
1326</pre><p><br>
1327
1328<h4><a name='docfunc64003' href='#tocfunc64003'>selenium::is_ordered</a></h4>
1329(define (selenium::is_ordered sel-sess locator1 locator2)<i><br> ... <a href='#codefunc64003'>Full Code</a> ... )</i>
1330<pre>Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will
1331not be considered ordered.
1332
1333'locator1' is an element locator pointing to the first element
1334'locator2' is an element locator pointing to the second element
1335</pre><p><br>
1336
1337<h4><a name='docfunc52350' href='#tocfunc52350'>selenium::get_element_position_left</a></h4>
1338(define (selenium::get_element_position_left sel-sess locator)<i><br> ... <a href='#codefunc52350'>Full Code</a> ... )</i>
1339<pre>Retrieves the horizontal position of an element
1340
1341'locator' is an element locator pointing to an element OR an element itself
1342</pre><p><br>
1343
1344<h4><a name='docfunc56852' href='#tocfunc56852'>selenium::get_element_position_top</a></h4>
1345(define (selenium::get_element_position_top sel-sess locator)<i><br> ... <a href='#codefunc56852'>Full Code</a> ... )</i>
1346<pre>Retrieves the vertical position of an element
1347
1348'locator' is an element locator pointing to an element OR an element itself
1349</pre><p><br>
1350
1351<h4><a name='docfunc9922' href='#tocfunc9922'>selenium::get_element_width</a></h4>
1352(define (selenium::get_element_width sel-sess locator)<i><br> ... <a href='#codefunc9922'>Full Code</a> ... )</i>
1353<pre>Retrieves the width of an element
1354
1355'locator' is an element locator pointing to an element
1356</pre><p><br>
1357
1358<h4><a name='docfunc35256' href='#tocfunc35256'>selenium::get_element_height</a></h4>
1359(define (selenium::get_element_height sel-sess locator)<i><br> ... <a href='#codefunc35256'>Full Code</a> ... )</i>
1360<pre>Retrieves the height of an element
1361
1362'locator' is an element locator pointing to an element
1363</pre><p><br>
1364
1365<h4><a name='docfunc50222' href='#tocfunc50222'>selenium::get_cursor_position</a></h4>
1366(define (selenium::get_cursor_position sel-sess locator)<i><br> ... <a href='#codefunc50222'>Full Code</a> ... )</i>
1367<pre>Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
1368
1369Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to
1370return the position of the last location of the cursor, even though the cursor is now gone from the page.  This is filed as SEL-243.
1371
1372This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
1373
1374'locator' is an element locator pointing to an input element or textarea
1375</pre><p><br>
1376
1377<h4><a name='docfunc55031' href='#tocfunc55031'>selenium::get_expression</a></h4>
1378(define (selenium::get_expression sel-sess expression)<i><br> ... <a href='#codefunc55031'>Full Code</a> ... )</i>
1379<pre>Returns the specified expression.
1380
1381This is useful because of JavaScript preprocessing.
1382It is used to generate commands like assertExpression and waitForExpression.
1383
1384
1385'expression' is the value to return
1386</pre><p><br>
1387
1388<h4><a name='docfunc50024' href='#tocfunc50024'>selenium::get_xpath_count</a></h4>
1389(define (selenium::get_xpath_count sel-sess xpath)<i><br> ... <a href='#codefunc50024'>Full Code</a> ... )</i>
1390<pre>Returns the number of nodes that match the specified xpath, eg. &quot;//table&quot; would give
1391the number of tables.
1392
1393'xpath' is the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
1394</pre><p><br>
1395
1396<h4><a name='docfunc37117' href='#tocfunc37117'>selenium::assign_id</a></h4>
1397(define (selenium::assign_id sel-sess locator identifier)<i><br> ... <a href='#codefunc37117'>Full Code</a> ... )</i>
1398<pre>Temporarily sets the &quot;id&quot; attribute of the specified element, so you can locate it in the future
1399using its ID rather than a slow/complicated XPath.  This ID will disappear once the page is
1400reloaded.
1401
1402'locator' is an element locator pointing to an element
1403'identifier' is a string to be used as the ID of the specified element
1404</pre><p><br>
1405
1406<h4><a name='docfunc35296' href='#tocfunc35296'>selenium::allow_native_xpath</a></h4>
1407(define (selenium::allow_native_xpath sel-sess allow)<i><br> ... <a href='#codefunc35296'>Full Code</a> ... )</i>
1408<pre>Specifies whether Selenium should use the native in-browser implementation
1409of XPath (if any native version is available); if you pass &quot;false&quot; to
1410this function, we will always use our pure-JavaScript xpath library.
1411Using the pure-JS xpath library can improve the consistency of xpath
1412element locators between different browser vendors, but the pure-JS
1413version is much slower than the native implementations.
1414
1415'allow' is boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath
1416</pre><p><br>
1417
1418<h4><a name='docfunc40388' href='#tocfunc40388'>selenium::wait_for_condition</a></h4>
1419(define (selenium::wait_for_condition sel-sess script timeout)<i><br> ... <a href='#codefunc40388'>Full Code</a> ... )</i>
1420<pre>Runs the specified JavaScript snippet repeatedly until it evaluates to &quot;true&quot;.
1421The snippet may have multiple lines, but only the result of the last line
1422will be considered.
1423
1424Note that, by default, the snippet will be run in the runner's test window, not in the window
1425of your application.  To get the window of your application, you can use
1426the JavaScript snippet &lt;tt&gt;selenium.browserbot.getCurrentWindow()&lt;/tt&gt;, and then
1427run your JavaScript in there
1428
1429
1430'script' is the JavaScript snippet to run
1431'timeout' is a timeout in milliseconds, after which this command will return with an error
1432</pre><p><br>
1433
1434<h4><a name='docfunc58794' href='#tocfunc58794'>selenium::set_timeout</a></h4>
1435(define (selenium::set_timeout sel-sess timeout)<i><br> ... <a href='#codefunc58794'>Full Code</a> ... )</i>
1436<pre>Specifies the amount of time that Selenium will wait for actions to complete.
1437
1438Actions that require waiting include &quot;open&quot; and the &quot;waitFor*&quot; actions.
1439
1440The default timeout is 30 seconds.
1441
1442'timeout' is a timeout in milliseconds, after which the action will return with an error
1443</pre><p><br>
1444
1445<h4><a name='docfunc65402' href='#tocfunc65402'>selenium::wait_for_page_to_load</a></h4>
1446(define (selenium::wait_for_page_to_load sel-sess timeout)<i><br> ... <a href='#codefunc65402'>Full Code</a> ... )</i>
1447<pre>Waits for a new page to load.
1448
1449You can use this command instead of the &quot;AndWait&quot; suffixes, &quot;clickAndWait&quot;, &quot;selectAndWait&quot;, &quot;typeAndWait&quot; etc.
1450(which are only available in the JS API).
1451Selenium constantly keeps track of new pages loading, and sets a &quot;newPageLoaded&quot;
1452flag when it first notices a page load.  Running any other Selenium command after
1453turns the flag to false.  Hence, if you want to wait for a page to load, you must
1454wait immediately after a Selenium command that caused a page-load.
1455
1456
1457'timeout' is a timeout in milliseconds, after which this command will return with an error
1458</pre><p><br>
1459
1460<h4><a name='docfunc24457' href='#tocfunc24457'>selenium::wait_for_frame_to_load</a></h4>
1461(define (selenium::wait_for_frame_to_load sel-sess frameAddress timeout)<i><br> ... <a href='#codefunc24457'>Full Code</a> ... )</i>
1462<pre>Waits for a new frame to load.
1463
1464Selenium constantly keeps track of new pages and frames loading,
1465and sets a &quot;newPageLoaded&quot; flag when it first notices a page load.
1466
1467
1468See waitForPageToLoad for more information.
1469
1470'frameAddress' is FrameAddress from the server side
1471'timeout' is a timeout in milliseconds, after which this command will return with an error
1472</pre><p><br>
1473
1474<h4><a name='docfunc57621' href='#tocfunc57621'>selenium::get_cookie</a></h4>
1475(define (selenium::get_cookie sel-sess)<i><br> ... <a href='#codefunc57621'>Full Code</a> ... )</i>
1476<pre>Return all cookies of the current page under test.
1477
1478</pre><p><br>
1479
1480<h4><a name='docfunc20954' href='#tocfunc20954'>selenium::create_cookie</a></h4>
1481(define (selenium::create_cookie sel-sess nameValuePair optionsString)<i><br> ... <a href='#codefunc20954'>Full Code</a> ... )</i>
1482<pre>Create a new cookie whose path and domain are same with those of current page
1483under test, unless you specified a path for this cookie explicitly.
1484
1485'nameValuePair' is name and value of the cookie in a format &quot;name=value&quot;
1486'optionsString' is options for the cookie. Currently supported options include 'path' and 'max_age'.      the optionsString's format is &quot;path=/path/, max_age=60&quot;. The order of options are irrelevant, the unit      of the value of 'max_age' is second.
1487</pre><p><br>
1488
1489<h4><a name='docfunc18658' href='#tocfunc18658'>selenium::delete_cookie</a></h4>
1490(define (selenium::delete_cookie sel-sess name path)<i><br> ... <a href='#codefunc18658'>Full Code</a> ... )</i>
1491<pre>Delete a named cookie with specified path.
1492
1493'name' is the name of the cookie to be deleted
1494'path' is the path property of the cookie to be deleted
1495</pre><p><br>
1496
1497<h4><a name='docfunc59839' href='#tocfunc59839'>selenium::set_browser_log_level</a></h4>
1498(define (selenium::set_browser_log_level sel-sess logLevel)<i><br> ... <a href='#codefunc59839'>Full Code</a> ... )</i>
1499<pre>Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
1500Valid logLevel strings are: &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot; or &quot;off&quot;.
1501To see the browser logs, you need to
1502either show the log window in GUI mode, or enable browser-side logging in Selenium RC.
1503
1504'logLevel' is one of the following: &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot; or &quot;off&quot;
1505</pre><p><br>
1506
1507<h4><a name='docfunc62004' href='#tocfunc62004'>selenium::run_script</a></h4>
1508(define (selenium::run_script sel-sess script)<i><br> ... <a href='#codefunc62004'>Full Code</a> ... )</i>
1509<pre>Creates a new &quot;script&quot; tag in the body of the current test window, and
1510adds the specified text into the body of the command.  Scripts run in
1511this way can often be debugged more easily than scripts executed using
1512Selenium's &quot;getEval&quot; command.  Beware that JS exceptions thrown in these script
1513tags aren't managed by Selenium, so you should probably wrap your script
1514in try/catch blocks if there is any chance that the script will throw
1515an exception.
1516
1517'script' is the JavaScript snippet to run
1518</pre><p><br>
1519
1520<h4><a name='docfunc2699' href='#tocfunc2699'>selenium::add_location_strategy</a></h4>
1521(define (selenium::add_location_strategy sel-sess strategyName functionDefinition)<i><br> ... <a href='#codefunc2699'>Full Code</a> ... )</i>
1522<pre>Defines a new function for Selenium to locate elements on the page.
1523For example,
1524if you define the strategy &quot;foo&quot;, and someone runs click(&quot;foo=blah&quot;), we'll
1525run your function, passing you the string &quot;blah&quot;, and click on the element
1526that your function
1527returns, or throw an &quot;Element not found&quot; error if your function returns null.
1528
1529We'll pass three arguments to your function:
1530locator: the string the user passed ininWindow: the currently selected windowinDocument: the currently selected document
1531
1532The function must return null if the element can't be found.
1533
1534'strategyName' is the name of the strategy to define; this should use only   letters [a-zA-Z] with no spaces or other punctuation.
1535'functionDefinition' is a string defining the body of a function in JavaScript.   For example: &lt;tt&gt;return inDocument.getElementById(locator);&lt;/tt&gt;
1536</pre><p><br>
1537
1538<h4><a name='docfunc64912' href='#tocfunc64912'>selenium::set_context</a></h4>
1539(define (selenium::set_context sel-sess context)<i><br> ... <a href='#codefunc64912'>Full Code</a> ... )</i>
1540<pre>Writes a message to the status bar and adds a note to the browser-side
1541log.
1542
1543'context' is the message to be sent to the browser
1544</pre><p><br>
1545
1546<h4><a name='docfunc38874' href='#tocfunc38874'>selenium::capture_screenshot</a></h4>
1547(define (selenium::capture_screenshot sel-sess filename)<i><br> ... <a href='#codefunc38874'>Full Code</a> ... )</i>
1548<pre>Captures a PNG screenshot to the specified file.
1549
1550'filename' is the absolute path to the file to be written, e.g. &quot;c:\blah\screenshot.png&quot;
1551</pre><p><br>
1552<center><h1>Code</h1></center>
1553
1554<h5><a name='codeapp31903' href='#docapp31903'>define-record</a></h5>
1555<i><a href='#tocapp31903'>Index</a></i><br>
1556
1557<pre>(define-record
1558    selenium-session
1559    server-host
1560    server-port
1561    browser-start-command
1562    browser-url
1563    timeout
1564    session-id)
1565
1566</pre>
1567<h4><a name='codefunc62238' href='#docfunc62238'>new-selenium-session</a></h4>
1568<i><a href='#tocfunc62238'>Index</a></i><br>
1569
1570<pre>This is so we can allow defaults and not force the session id to
1571be defined.  Timeout is in seconds, and defaults to 30.
1572</pre>
1573<pre>(define (new-selenium-session
1574          server-host
1575          server-port
1576          browser-start-command
1577          browser-url
1578          #!optional timeout)
1579  (make-selenium-session
1580    server-host
1581    server-port
1582    browser-start-command
1583    browser-url
1584    (or timeout 30)
1585    #f))
1586
1587</pre>
1588<h4><a name='codefunc57818' href='#docfunc57818'>selenium::do-command</a></h4>
1589<i><a href='#tocfunc57818'>Index</a></i><br>
1590
1591<pre>(define (selenium::do-command sel-sess verb . args)
1592  ;(format #t &quot;d-c args: ~A\n&quot; args)
1593  (let*
1594    (
1595     [url
1596       (uri-&gt;string
1597         (make-uri
1598           scheme: 'http
1599           ; List of authority, path, query.  Authority is in turn
1600           ; userinfo, host, port.
1601           specific: (list
1602                       (list
1603                         #f
1604                         (selenium-session-server-host sel-sess)
1605                         (selenium-session-server-port sel-sess))
1606                       &quot;/selenium-server/driver/&quot;
1607                       ; Create an alist of the arguments.  The
1608                       ; session-id we may or may not want to
1609                       ; populate, depending on whether we have one
1610                       ; yet.
1611                       (let
1612                         ([main-list
1613                            (cons
1614                              (cons &quot;cmd&quot; verb)
1615                              (cond
1616                                [(null? args) '()]
1617                                [(and (null? (car args)) (null? (cdr args))) '()]
1618                                [else (map
1619                                        (lambda (a b) (cons a b))
1620                                        (iota (length args) 1)
1621                                        args)]))])
1622                         ; Add the session ID, or not.
1623                         (cond
1624                           [(selenium-session-session-id sel-sess)
1625                            (append
1626                              main-list
1627                              (list (cons &quot;sessionId&quot; (selenium-session-session-id sel-sess))))]
1628                           [else main-list])))))]
1629     [http-thread (make-thread (lambda ()
1630                                 (http:GET (http:make-request
1631                                             'GET url
1632                                             '((&quot;Connection&quot; . &quot;close&quot;))
1633                                             '() &quot;&quot; 'HTTP/1.1))))]
1634     [result (begin
1635               (thread-start! http-thread)
1636               ;(format #t &quot;start done.\n&quot;)
1637               (thread-join! http-thread (selenium-session-timeout sel-sess) #f))])
1638    ;(format #t &quot;do-command verb: ~A.\n&quot; verb)
1639    ;(format #t &quot;do-command args: ~A.\n&quot; args)
1640    ;(format #t &quot;do-command url: ~A.\n&quot; url)
1641    ;(format #t &quot;do-command output: ~A.\n&quot; result)
1642    result))
1643
1644</pre>
1645<h4><a name='codefunc46125' href='#docfunc46125'>selenium::get-string</a></h4>
1646<i><a href='#tocfunc46125'>Index</a></i><br>
1647
1648<pre>Selenium strings start with &quot;OK,&quot;.  The rest is the string.
1649</pre>
1650<pre>(define (selenium::get-string sel-sess verb . args)
1651  (string-drop (apply selenium::do-command (cons* sel-sess verb args)) 3))
1652
1653</pre>
1654<h4><a name='codefunc47386' href='#docfunc47386'>selenium::get-number</a></h4>
1655<i><a href='#tocfunc47386'>Index</a></i><br>
1656
1657<pre>Just turn the Selenium string into a number
1658</pre>
1659<pre>(define (selenium::get-number sel-sess verb . args)
1660  (string-&gt;number (selenium::get-string sel-sess verb args)))
1661
1662</pre>
1663<h4><a name='codefunc44158' href='#docfunc44158'>selenium::get-boolean</a></h4>
1664<i><a href='#tocfunc44158'>Index</a></i><br>
1665
1666<pre>Selenium booleans are one of the literal strings &quot;true&quot; and
1667&quot;false&quot;
1668</pre>
1669<pre>(define (selenium::get-boolean sel-sess verb . args)
1670  (let
1671    ([str (selenium::get-string sel-sess verb args)])
1672    ; We let cond throw an exception if neither string matches
1673    (cond
1674      [(string=? &quot;true&quot; str) #t]
1675      [(string=? &quot;false&quot; str) #f])))
1676
1677</pre>
1678<h4><a name='codefunc303' href='#docfunc303'>selenium::get-string-array</a></h4>
1679<i><a href='#tocfunc303'>Index</a></i><br>
1680
1681<pre>Selenium arrays are comma-seperated strings, with \ escapes
1682</pre>
1683<pre>(define (selenium::get-string-array sel-sess verb . args)
1684  (map
1685    (lambda (str)
1686      (string-substitute &quot;(?&lt;!\\\\)\\\\&quot; &quot;&quot; str #t))
1687    (string-split-fields
1688      &quot;(?&lt;!\\\\),&quot;
1689      (selenium::get-string sel-sess verb args)
1690      #:infix)))
1691
1692</pre>
1693<h4><a name='codefunc1564' href='#docfunc1564'>selenium::get-number-array</a></h4>
1694<i><a href='#tocfunc1564'>Index</a></i><br>
1695
1696<pre>Just turn the array bits into numbers
1697</pre>
1698<pre>(define (selenium::get-number-array sel-sess verb . args)
1699  (map
1700    string-&gt;number
1701    (selenium::get-string-array sel-sess verb args)))
1702
1703</pre>
1704<h4><a name='codefunc1564' href='#docfunc1564'>selenium::get-number-array</a></h4>
1705<i><a href='#tocfunc1564'>Index</a></i><br>
1706
1707<pre>Selenium booleans are one of the literal strings &quot;true&quot; and
1708&quot;false&quot;; convert all the bits
1709</pre>
1710<pre>(define (selenium::get-number-array sel-sess verb . args)
1711  (map
1712    (lambda (str)
1713      (cond
1714        [(string=? &quot;true&quot; str) #t]
1715        [(string=? &quot;false&quot; str) #f]))
1716    (selenium::get-string-array sel-sess verb args)))
1717
1718</pre>
1719<h4><a name='codefunc49990' href='#docfunc49990'>selenium::start</a></h4>
1720<i><a href='#tocfunc49990'>Index</a></i><br>
1721
1722<pre>Start a Selenium session (that is, launch the browser)
1723</pre>
1724<pre>(define (selenium::start sel-sess)
1725  (selenium-session-session-id-set!
1726    sel-sess
1727    (selenium::get-string
1728      sel-sess
1729      &quot;getNewBrowserSession&quot;
1730      (selenium-session-browser-start-command sel-sess)
1731      (selenium-session-browser-url sel-sess))))
1732
1733</pre>
1734<h4><a name='codefunc49376' href='#docfunc49376'>selenium::stop</a></h4>
1735<i><a href='#tocfunc49376'>Index</a></i><br>
1736
1737<pre>Stop a Selenium session (that is, close the browser)
1738</pre>
1739<pre>(define (selenium::stop sel-sess)
1740  (selenium::do-command sel-sess &quot;testComplete&quot; '())
1741  (selenium-session-session-id-set! sel-sess #f))
1742
1743</pre>
1744<h4><a name='codefunc44085' href='#docfunc44085'>selenium::click</a></h4>
1745<i><a href='#tocfunc44085'>Index</a></i><br>
1746
1747<pre>Clicks on a link, button, checkbox or radio button. If the click action
1748causes a new page to load (like a link usually does), call
1749waitForPageToLoad.
1750
1751'locator' is an element locator
1752</pre>
1753<pre>(define (selenium::click sel-sess locator)
1754            (selenium::do-command sel-sess &quot;click&quot; locator ))
1755
1756
1757</pre>
1758<h4><a name='codefunc19315' href='#docfunc19315'>selenium::double_click</a></h4>
1759<i><a href='#tocfunc19315'>Index</a></i><br>
1760
1761<pre>Double clicks on a link, button, checkbox or radio button. If the double click action
1762causes a new page to load (like a link usually does), call
1763waitForPageToLoad.
1764
1765'locator' is an element locator
1766</pre>
1767<pre>(define (selenium::double_click sel-sess locator)
1768            (selenium::do-command sel-sess &quot;doubleClick&quot; locator ))
1769
1770
1771</pre>
1772<h4><a name='codefunc32663' href='#docfunc32663'>selenium::click_at</a></h4>
1773<i><a href='#tocfunc32663'>Index</a></i><br>
1774
1775<pre>Clicks on a link, button, checkbox or radio button. If the click action
1776causes a new page to load (like a link usually does), call
1777waitForPageToLoad.
1778
1779'locator' is an element locator
1780'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
1781</pre>
1782<pre>(define (selenium::click_at sel-sess locator coordString)
1783            (selenium::do-command sel-sess &quot;clickAt&quot; locator coordString ))
1784
1785
1786</pre>
1787<h4><a name='codefunc44358' href='#docfunc44358'>selenium::double_click_at</a></h4>
1788<i><a href='#tocfunc44358'>Index</a></i><br>
1789
1790<pre>Doubleclicks on a link, button, checkbox or radio button. If the action
1791causes a new page to load (like a link usually does), call
1792waitForPageToLoad.
1793
1794'locator' is an element locator
1795'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
1796</pre>
1797<pre>(define (selenium::double_click_at sel-sess locator coordString)
1798            (selenium::do-command sel-sess &quot;doubleClickAt&quot; locator coordString ))
1799
1800
1801</pre>
1802<h4><a name='codefunc59930' href='#docfunc59930'>selenium::fire_event</a></h4>
1803<i><a href='#tocfunc59930'>Index</a></i><br>
1804
1805<pre>Explicitly simulate an event, to trigger the corresponding &quot;on&lt;em&gt;event&lt;/em&gt;&quot;
1806handler.
1807
1808'locator' is an element locator
1809'eventName' is the event name, e.g. &quot;focus&quot; or &quot;blur&quot;
1810</pre>
1811<pre>(define (selenium::fire_event sel-sess locator eventName)
1812            (selenium::do-command sel-sess &quot;fireEvent&quot; locator eventName ))
1813
1814
1815</pre>
1816<h4><a name='codefunc34603' href='#docfunc34603'>selenium::key_press</a></h4>
1817<i><a href='#tocfunc34603'>Index</a></i><br>
1818
1819<pre>Simulates a user pressing and releasing a key.
1820
1821'locator' is an element locator
1822'keySequence' is Either be a string(&quot;\&quot; followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: &quot;w&quot;, &quot;\119&quot;.
1823</pre>
1824<pre>(define (selenium::key_press sel-sess locator keySequence)
1825            (selenium::do-command sel-sess &quot;keyPress&quot; locator keySequence ))
1826
1827
1828</pre>
1829<h4><a name='codefunc44303' href='#docfunc44303'>selenium::shift_key_down</a></h4>
1830<i><a href='#tocfunc44303'>Index</a></i><br>
1831
1832<pre>Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
1833
1834</pre>
1835<pre>(define (selenium::shift_key_down sel-sess )
1836            (selenium::do-command sel-sess &quot;shiftKeyDown&quot; ))
1837
1838
1839</pre>
1840<h4><a name='codefunc16297' href='#docfunc16297'>selenium::shift_key_up</a></h4>
1841<i><a href='#tocfunc16297'>Index</a></i><br>
1842
1843<pre>Release the shift key.
1844
1845</pre>
1846<pre>(define (selenium::shift_key_up sel-sess )
1847            (selenium::do-command sel-sess &quot;shiftKeyUp&quot; ))
1848
1849
1850</pre>
1851<h4><a name='codefunc25569' href='#docfunc25569'>selenium::meta_key_down</a></h4>
1852<i><a href='#tocfunc25569'>Index</a></i><br>
1853
1854<pre>Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.
1855
1856</pre>
1857<pre>(define (selenium::meta_key_down sel-sess )
1858            (selenium::do-command sel-sess &quot;metaKeyDown&quot; ))
1859
1860
1861</pre>
1862<h4><a name='codefunc64883' href='#docfunc64883'>selenium::meta_key_up</a></h4>
1863<i><a href='#tocfunc64883'>Index</a></i><br>
1864
1865<pre>Release the meta key.
1866
1867</pre>
1868<pre>(define (selenium::meta_key_up sel-sess )
1869            (selenium::do-command sel-sess &quot;metaKeyUp&quot; ))
1870
1871
1872</pre>
1873<h4><a name='codefunc19092' href='#docfunc19092'>selenium::alt_key_down</a></h4>
1874<i><a href='#tocfunc19092'>Index</a></i><br>
1875
1876<pre>Press the alt key and hold it down until doAltUp() is called or a new page is loaded.
1877
1878</pre>
1879<pre>(define (selenium::alt_key_down sel-sess )
1880            (selenium::do-command sel-sess &quot;altKeyDown&quot; ))
1881
1882
1883</pre>
1884<h4><a name='codefunc56621' href='#docfunc56621'>selenium::alt_key_up</a></h4>
1885<i><a href='#tocfunc56621'>Index</a></i><br>
1886
1887<pre>Release the alt key.
1888
1889</pre>
1890<pre>(define (selenium::alt_key_up sel-sess )
1891            (selenium::do-command sel-sess &quot;altKeyUp&quot; ))
1892
1893
1894</pre>
1895<h4><a name='codefunc12655' href='#docfunc12655'>selenium::control_key_down</a></h4>
1896<i><a href='#tocfunc12655'>Index</a></i><br>
1897
1898<pre>Press the control key and hold it down until doControlUp() is called or a new page is loaded.
1899
1900</pre>
1901<pre>(define (selenium::control_key_down sel-sess )
1902            (selenium::do-command sel-sess &quot;controlKeyDown&quot; ))
1903
1904
1905</pre>
1906<h4><a name='codefunc50184' href='#docfunc50184'>selenium::control_key_up</a></h4>
1907<i><a href='#tocfunc50184'>Index</a></i><br>
1908
1909<pre>Release the control key.
1910
1911</pre>
1912<pre>(define (selenium::control_key_up sel-sess )
1913            (selenium::do-command sel-sess &quot;controlKeyUp&quot; ))
1914
1915
1916</pre>
1917<h4><a name='codefunc32446' href='#docfunc32446'>selenium::key_down</a></h4>
1918<i><a href='#tocfunc32446'>Index</a></i><br>
1919
1920<pre>Simulates a user pressing a key (without releasing it yet).
1921
1922'locator' is an element locator
1923'keySequence' is Either be a string(&quot;\&quot; followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: &quot;w&quot;, &quot;\119&quot;.
1924</pre>
1925<pre>(define (selenium::key_down sel-sess locator keySequence)
1926            (selenium::do-command sel-sess &quot;keyDown&quot; locator keySequence ))
1927
1928
1929</pre>
1930<h4><a name='codefunc4440' href='#docfunc4440'>selenium::key_up</a></h4>
1931<i><a href='#tocfunc4440'>Index</a></i><br>
1932
1933<pre>Simulates a user releasing a key.
1934
1935'locator' is an element locator
1936'keySequence' is Either be a string(&quot;\&quot; followed by the numeric keycode  of the key to be pressed, normally the ASCII value of that key), or a single  character. For example: &quot;w&quot;, &quot;\119&quot;.
1937</pre>
1938<pre>(define (selenium::key_up sel-sess locator keySequence)
1939            (selenium::do-command sel-sess &quot;keyUp&quot; locator keySequence ))
1940
1941
1942</pre>
1943<h4><a name='codefunc1819' href='#docfunc1819'>selenium::mouse_over</a></h4>
1944<i><a href='#tocfunc1819'>Index</a></i><br>
1945
1946<pre>Simulates a user hovering a mouse over the specified element.
1947
1948'locator' is an element locator
1949</pre>
1950<pre>(define (selenium::mouse_over sel-sess locator)
1951            (selenium::do-command sel-sess &quot;mouseOver&quot; locator ))
1952
1953
1954</pre>
1955<h4><a name='codefunc37929' href='#docfunc37929'>selenium::mouse_out</a></h4>
1956<i><a href='#tocfunc37929'>Index</a></i><br>
1957
1958<pre>Simulates a user moving the mouse pointer away from the specified element.
1959
1960'locator' is an element locator
1961</pre>
1962<pre>(define (selenium::mouse_out sel-sess locator)
1963            (selenium::do-command sel-sess &quot;mouseOut&quot; locator ))
1964
1965
1966</pre>
1967<h4><a name='codefunc64545' href='#docfunc64545'>selenium::mouse_down</a></h4>
1968<i><a href='#tocfunc64545'>Index</a></i><br>
1969
1970<pre>Simulates a user pressing the mouse button (without releasing it yet) on
1971the specified element.
1972
1973'locator' is an element locator
1974</pre>
1975<pre>(define (selenium::mouse_down sel-sess locator)
1976            (selenium::do-command sel-sess &quot;mouseDown&quot; locator ))
1977
1978
1979</pre>
1980<h4><a name='codefunc24053' href='#docfunc24053'>selenium::mouse_down_at</a></h4>
1981<i><a href='#tocfunc24053'>Index</a></i><br>
1982
1983<pre>Simulates a user pressing the mouse button (without releasing it yet) at
1984the specified location.
1985
1986'locator' is an element locator
1987'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
1988</pre>
1989<pre>(define (selenium::mouse_down_at sel-sess locator coordString)
1990            (selenium::do-command sel-sess &quot;mouseDownAt&quot; locator coordString ))
1991
1992
1993</pre>
1994<h4><a name='codefunc36539' href='#docfunc36539'>selenium::mouse_up</a></h4>
1995<i><a href='#tocfunc36539'>Index</a></i><br>
1996
1997<pre>Simulates the event that occurs when the user releases the mouse button (i.e., stops
1998holding the button down) on the specified element.
1999
2000'locator' is an element locator
2001</pre>
2002<pre>(define (selenium::mouse_up sel-sess locator)
2003            (selenium::do-command sel-sess &quot;mouseUp&quot; locator ))
2004
2005
2006</pre>
2007<h4><a name='codefunc61582' href='#docfunc61582'>selenium::mouse_up_at</a></h4>
2008<i><a href='#tocfunc61582'>Index</a></i><br>
2009
2010<pre>Simulates the event that occurs when the user releases the mouse button (i.e., stops
2011holding the button down) at the specified location.
2012
2013'locator' is an element locator
2014'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
2015</pre>
2016<pre>(define (selenium::mouse_up_at sel-sess locator coordString)
2017            (selenium::do-command sel-sess &quot;mouseUpAt&quot; locator coordString ))
2018
2019
2020</pre>
2021<h4><a name='codefunc62249' href='#docfunc62249'>selenium::mouse_move</a></h4>
2022<i><a href='#tocfunc62249'>Index</a></i><br>
2023
2024<pre>Simulates a user pressing the mouse button (without releasing it yet) on
2025the specified element.
2026
2027'locator' is an element locator
2028</pre>
2029<pre>(define (selenium::mouse_move sel-sess locator)
2030            (selenium::do-command sel-sess &quot;mouseMove&quot; locator ))
2031
2032
2033</pre>
2034<h4><a name='codefunc21757' href='#docfunc21757'>selenium::mouse_move_at</a></h4>
2035<i><a href='#tocfunc21757'>Index</a></i><br>
2036
2037<pre>Simulates a user pressing the mouse button (without releasing it yet) on
2038the specified element.
2039
2040'locator' is an element locator
2041'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
2042</pre>
2043<pre>(define (selenium::mouse_move_at sel-sess locator coordString)
2044            (selenium::do-command sel-sess &quot;mouseMoveAt&quot; locator coordString ))
2045
2046
2047</pre>
2048<h4><a name='codefunc47842' href='#docfunc47842'>selenium::type</a></h4>
2049<i><a href='#tocfunc47842'>Index</a></i><br>
2050
2051<pre>Sets the value of an input field, as though you typed it in.
2052
2053Can also be used to set the value of combo boxes, check boxes, etc. In these cases,
2054value should be the value of the option selected, not the visible text.
2055
2056
2057'locator' is an element locator
2058'value' is the value to type
2059</pre>
2060<pre>(define (selenium::type sel-sess locator value)
2061            (selenium::do-command sel-sess &quot;type&quot; locator value ))
2062
2063
2064</pre>
2065<h4><a name='codefunc40986' href='#docfunc40986'>selenium::type_keys</a></h4>
2066<i><a href='#tocfunc40986'>Index</a></i><br>
2067
2068<pre>Simulates keystroke events on the specified element, as though you typed the value key-by-key.
2069
2070This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string;
2071this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.
2072Unlike the simple &quot;type&quot; command, which forces the specified value into the page directly, this command
2073may or may not have any visible effect, even in cases where typing keys would normally have a visible effect.
2074For example, if you use &quot;typeKeys&quot; on a form element, you may or may not see the results of what you typed in
2075the field.
2076In some cases, you may need to use the simple &quot;type&quot; command to set the value of the field and then the &quot;typeKeys&quot; command to
2077send the keystroke events corresponding to what you just typed.
2078
2079
2080'locator' is an element locator
2081'value' is the value to type
2082</pre>
2083<pre>(define (selenium::type_keys sel-sess locator value)
2084            (selenium::do-command sel-sess &quot;typeKeys&quot; locator value ))
2085
2086
2087</pre>
2088<h4><a name='codefunc30498' href='#docfunc30498'>selenium::set_speed</a></h4>
2089<i><a href='#tocfunc30498'>Index</a></i><br>
2090
2091<pre>Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation).  By default, there is no such delay, i.e.,
2092the delay is 0 milliseconds.
2093
2094'value' is the number of milliseconds to pause after operation
2095</pre>
2096<pre>(define (selenium::set_speed sel-sess value)
2097            (selenium::do-command sel-sess &quot;setSpeed&quot; value ))
2098
2099
2100</pre>
2101<h4><a name='codefunc30486' href='#docfunc30486'>selenium::get_speed</a></h4>
2102<i><a href='#tocfunc30486'>Index</a></i><br>
2103
2104<pre>Get execution speed (i.e., get the millisecond length of the delay following each selenium operation).  By default, there is no such delay, i.e.,
2105the delay is 0 milliseconds.
2106
2107See also setSpeed.
2108
2109</pre>
2110<pre>(define (selenium::get_speed sel-sess )
2111            (selenium::do-command sel-sess &quot;getSpeed&quot; ))
2112
2113
2114</pre>
2115<h4><a name='codefunc43057' href='#docfunc43057'>selenium::check</a></h4>
2116<i><a href='#tocfunc43057'>Index</a></i><br>
2117
2118<pre>Check a toggle-button (checkbox/radio)
2119
2120'locator' is an element locator
2121</pre>
2122<pre>(define (selenium::check sel-sess locator)
2123            (selenium::do-command sel-sess &quot;check&quot; locator ))
2124
2125
2126</pre>
2127<h4><a name='codefunc5799' href='#docfunc5799'>selenium::uncheck</a></h4>
2128<i><a href='#tocfunc5799'>Index</a></i><br>
2129
2130<pre>Uncheck a toggle-button (checkbox/radio)
2131
2132'locator' is an element locator
2133</pre>
2134<pre>(define (selenium::uncheck sel-sess locator)
2135            (selenium::do-command sel-sess &quot;uncheck&quot; locator ))
2136
2137
2138</pre>
2139<h4><a name='codefunc6977' href='#docfunc6977'>selenium::select</a></h4>
2140<i><a href='#tocfunc6977'>Index</a></i><br>
2141
2142<pre>Select an option from a drop-down using an option locator.
2143
2144
2145Option locators provide different ways of specifying options of an HTML
2146Select element (e.g. for selecting a specific option, or for asserting
2147that the selected option satisfies a specification). There are several
2148forms of Select Option Locator.
2149
2150&lt;b&gt;label&lt;/b&gt;=&lt;em&gt;labelPattern&lt;/em&gt;:
2151matches options based on their labels, i.e. the visible text. (This
2152is the default.)
2153label=regexp:^[Oo]ther
2154&lt;b&gt;value&lt;/b&gt;=&lt;em&gt;valuePattern&lt;/em&gt;:
2155matches options based on their values.
2156value=other
2157&lt;b&gt;id&lt;/b&gt;=&lt;em&gt;id&lt;/em&gt;:
2158
2159matches options based on their ids.
2160id=option1
2161&lt;b&gt;index&lt;/b&gt;=&lt;em&gt;index&lt;/em&gt;:
2162matches an option based on its index (offset from zero).
2163index=2
2164
2165
2166If no option locator prefix is provided, the default behaviour is to match on &lt;b&gt;label&lt;/b&gt;.
2167
2168
2169
2170'selectLocator' is an element locator identifying a drop-down menu
2171'optionLocator' is an option locator (a label by default)
2172</pre>
2173<pre>(define (selenium::select sel-sess selectLocator optionLocator)
2174            (selenium::do-command sel-sess &quot;select&quot; selectLocator optionLocator ))
2175
2176
2177</pre>
2178<h4><a name='codefunc20190' href='#docfunc20190'>selenium::add_selection</a></h4>
2179<i><a href='#tocfunc20190'>Index</a></i><br>
2180
2181<pre>Add a selection to the set of selected options in a multi-select element using an option locator.
2182
2183@see #doSelect for details of option locators
2184
2185'locator' is an element locator identifying a multi-select box
2186'optionLocator' is an option locator (a label by default)
2187</pre>
2188<pre>(define (selenium::add_selection sel-sess locator optionLocator)
2189            (selenium::do-command sel-sess &quot;addSelection&quot; locator optionLocator ))
2190
2191
2192</pre>
2193<h4><a name='codefunc12642' href='#docfunc12642'>selenium::remove_selection</a></h4>
2194<i><a href='#tocfunc12642'>Index</a></i><br>
2195
2196<pre>Remove a selection from the set of selected options in a multi-select element using an option locator.
2197
2198@see #doSelect for details of option locators
2199
2200'locator' is an element locator identifying a multi-select box
2201'optionLocator' is an option locator (a label by default)
2202</pre>
2203<pre>(define (selenium::remove_selection sel-sess locator optionLocator)
2204            (selenium::do-command sel-sess &quot;removeSelection&quot; locator optionLocator ))
2205
2206
2207</pre>
2208<h4><a name='codefunc65440' href='#docfunc65440'>selenium::remove_all_selections</a></h4>
2209<i><a href='#tocfunc65440'>Index</a></i><br>
2210
2211<pre>Unselects all of the selected options in a multi-select element.
2212
2213'locator' is an element locator identifying a multi-select box
2214</pre>
2215<pre>(define (selenium::remove_all_selections sel-sess locator)
2216            (selenium::do-command sel-sess &quot;removeAllSelections&quot; locator ))
2217
2218
2219</pre>
2220<h4><a name='codefunc13117' href='#docfunc13117'>selenium::submit</a></h4>
2221<i><a href='#tocfunc13117'>Index</a></i><br>
2222
2223<pre>Submit the specified form. This is particularly useful for forms without
2224submit buttons, e.g. single-input &quot;Search&quot; forms.
2225
2226'formLocator' is an element locator for the form you want to submit
2227</pre>
2228<pre>(define (selenium::submit sel-sess formLocator)
2229            (selenium::do-command sel-sess &quot;submit&quot; formLocator ))
2230
2231
2232</pre>
2233<h4><a name='codefunc47826' href='#docfunc47826'>selenium::open</a></h4>
2234<i><a href='#tocfunc47826'>Index</a></i><br>
2235
2236<pre>Opens an URL in the test frame. This accepts both relative and absolute
2237URLs.
2238
2239The &quot;open&quot; command waits for the page to load before proceeding,
2240ie. the &quot;AndWait&quot; suffix is implicit.
2241
2242&lt;em&gt;Note&lt;/em&gt;: The URL must be on the same domain as the runner HTML
2243due to security restrictions in the browser (Same Origin Policy). If you
2244need to open an URL on another domain, use the Selenium Server to start a
2245new browser session on that domain.
2246
2247'url' is the URL to open; may be relative or absolute
2248</pre>
2249<pre>(define (selenium::open sel-sess url)
2250            (selenium::do-command sel-sess &quot;open&quot; url ))
2251
2252
2253</pre>
2254<h4><a name='codefunc4215' href='#docfunc4215'>selenium::open_window</a></h4>
2255<i><a href='#tocfunc4215'>Index</a></i><br>
2256
2257<pre>Opens a popup window (if a window with that ID isn't already open).
2258After opening the window, you'll need to select it using the selectWindow
2259command.
2260
2261This command can also be a useful workaround for bug SEL-339.  In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the &quot;onLoad&quot; event, for example).
2262In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using
2263an empty (blank) url, like this: openWindow(&quot;&quot;, &quot;myFunnyWindow&quot;).
2264
2265
2266'url' is the URL to open, which can be blank
2267'windowID' is the JavaScript window ID of the window to select
2268</pre>
2269<pre>(define (selenium::open_window sel-sess url windowID)
2270            (selenium::do-command sel-sess &quot;openWindow&quot; url windowID ))
2271
2272
2273</pre>
2274<h4><a name='codefunc28901' href='#docfunc28901'>selenium::select_window</a></h4>
2275<i><a href='#tocfunc28901'>Index</a></i><br>
2276
2277<pre>Selects a popup window; once a popup window has been selected, all
2278commands go to that window. To select the main window again, use null
2279as the target.
2280
2281Note that there is a big difference between a window's internal JavaScript &quot;name&quot; property
2282and the &quot;title&quot; of a given window's document (which is normally what you actually see, as an end user,
2283in the title bar of the window).  The &quot;name&quot; is normally invisible to the end-user; it's the second
2284parameter &quot;windowName&quot; passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag)
2285(which selenium intercepts).
2286Selenium has several strategies for finding the window object referred to by the &quot;windowID&quot; parameter.
22871.) if windowID is null, (or the string &quot;null&quot;) then it is assumed the user is referring to the original window instantiated by the browser).
22882.) if the value of the &quot;windowID&quot; parameter is a JavaScript variable name in the current application window, then it is assumed
2289that this variable contains the return value from a call to the JavaScript window.open() method.
22903.) Otherwise, selenium looks in a hash it maintains that maps string names to window &quot;names&quot;.
22914.) If &lt;em&gt;that&lt;/em&gt; fails, we'll try looping over all of the known windows to try to find the appropriate &quot;title&quot;.
2292Since &quot;title&quot; is not necessarily unique, this may have unexpected behavior.
2293If you're having trouble figuring out what is the name of a window that you want to manipulate, look at the selenium log messages
2294which identify the names of windows created via window.open (and therefore intercepted by selenium).  You will see messages
2295like the following for each window as it is opened:
2296&lt;tt&gt;debug: window.open call intercepted; window ID (which you can use with selectWindow()) is &quot;myNewWindow&quot;&lt;/tt&gt;
2297In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the &quot;onLoad&quot; event, for example).
2298(This is bug SEL-339.)  In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using
2299an empty (blank) url, like this: openWindow(&quot;&quot;, &quot;myFunnyWindow&quot;).
2300
2301
2302'windowID' is the JavaScript window ID of the window to select
2303</pre>
2304<pre>(define (selenium::select_window sel-sess windowID)
2305            (selenium::do-command sel-sess &quot;selectWindow&quot; windowID ))
2306
2307
2308</pre>
2309<h4><a name='codefunc18560' href='#docfunc18560'>selenium::select_frame</a></h4>
2310<i><a href='#tocfunc18560'>Index</a></i><br>
2311
2312<pre>Selects a frame within the current window.  (You may invoke this command
2313multiple times to select nested frames.)  To select the parent frame, use
2314&quot;relative=parent&quot; as a locator; to select the top frame, use &quot;relative=top&quot;.
2315You can also select a frame by its 0-based index number; select the first frame with
2316&quot;index=0&quot;, or the third frame with &quot;index=2&quot;.
2317
2318You may also use a DOM expression to identify the frame you want directly,
2319like this: &lt;tt&gt;dom=frames[&quot;main&quot;].frames[&quot;subframe&quot;]&lt;/tt&gt;
2320
2321
2322'locator' is an element locator identifying a frame or iframe
2323</pre>
2324<pre>(define (selenium::select_frame sel-sess locator)
2325            (selenium::do-command sel-sess &quot;selectFrame&quot; locator ))
2326
2327
2328</pre>
2329<h4><a name='codefunc57766' href='#docfunc57766'>selenium::get_whether_this_frame_match_frame_expression</a></h4>
2330<i><a href='#tocfunc57766'>Index</a></i><br>
2331
2332<pre>Determine whether current/locator identify the frame containing this running code.
2333
2334This is useful in proxy injection mode, where this code runs in every
2335browser frame and window, and sometimes the selenium server needs to identify
2336the &quot;current&quot; frame.  In this case, when the test calls selectFrame, this
2337routine is called for each frame to figure out which one has been selected.
2338The selected frame will return true, while all others will return false.
2339
2340
2341'currentFrameString' is starting frame
2342'target' is new frame (which might be relative to the current one)
2343</pre>
2344<pre>(define (selenium::get_whether_this_frame_match_frame_expression sel-sess currentFrameString target)
2345            (selenium::get-boolean sel-sess &quot;getWhetherThisFrameMatchFrameExpression&quot; currentFrameString target ))
2346
2347
2348</pre>
2349<h4><a name='codefunc23368' href='#docfunc23368'>selenium::get_whether_this_window_match_window_expression</a></h4>
2350<i><a href='#tocfunc23368'>Index</a></i><br>
2351
2352<pre>Determine whether currentWindowString plus target identify the window containing this running code.
2353
2354This is useful in proxy injection mode, where this code runs in every
2355browser frame and window, and sometimes the selenium server needs to identify
2356the &quot;current&quot; window.  In this case, when the test calls selectWindow, this
2357routine is called for each window to figure out which one has been selected.
2358The selected window will return true, while all others will return false.
2359
2360
2361'currentWindowString' is starting window
2362'target' is new window (which might be relative to the current one, e.g., &quot;_parent&quot;)
2363</pre>
2364<pre>(define (selenium::get_whether_this_window_match_window_expression sel-sess currentWindowString target)
2365            (selenium::get-boolean sel-sess &quot;getWhetherThisWindowMatchWindowExpression&quot; currentWindowString target ))
2366
2367
2368</pre>
2369<h4><a name='codefunc57675' href='#docfunc57675'>selenium::wait_for_pop_up</a></h4>
2370<i><a href='#tocfunc57675'>Index</a></i><br>
2371
2372<pre>Waits for a popup window to appear and load up.
2373
2374'windowID' is the JavaScript window ID of the window that will appear
2375'timeout' is a timeout in milliseconds, after which the action will return with an error
2376</pre>
2377<pre>(define (selenium::wait_for_pop_up sel-sess windowID timeout)
2378            (selenium::do-command sel-sess &quot;waitForPopUp&quot; windowID timeout ))
2379
2380
2381</pre>
2382<h4><a name='codefunc58889' href='#docfunc58889'>selenium::choose_cancel_on_next_confirmation</a></h4>
2383<i><a href='#tocfunc58889'>Index</a></i><br>
2384
2385<pre>By default, Selenium's overridden window.confirm() function will
2386return true, as if the user had manually clicked OK; after running
2387this command, the next call to confirm() will return false, as if
2388the user had clicked Cancel.  Selenium will then resume using the
2389default behavior for future confirmations, automatically returning
2390true (OK) unless/until you explicitly call this command for each
2391confirmation.
2392
2393</pre>
2394<pre>(define (selenium::choose_cancel_on_next_confirmation sel-sess )
2395            (selenium::do-command sel-sess &quot;chooseCancelOnNextConfirmation&quot; ))
2396
2397
2398</pre>
2399<h4><a name='codefunc7748' href='#docfunc7748'>selenium::choose_ok_on_next_confirmation</a></h4>
2400<i><a href='#tocfunc7748'>Index</a></i><br>
2401
2402<pre>Undo the effect of calling chooseCancelOnNextConfirmation.  Note
2403that Selenium's overridden window.confirm() function will normally automatically
2404return true, as if the user had manually clicked OK, so you shouldn't
2405need to use this command unless for some reason you need to change
2406your mind prior to the next confirmation.  After any confirmation, Selenium will resume using the
2407default behavior for future confirmations, automatically returning
2408true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each
2409confirmation.
2410
2411</pre>
2412<pre>(define (selenium::choose_ok_on_next_confirmation sel-sess )
2413            (selenium::do-command sel-sess &quot;chooseOkOnNextConfirmation&quot; ))
2414
2415
2416</pre>
2417<h4><a name='codefunc11680' href='#docfunc11680'>selenium::answer_on_next_prompt</a></h4>
2418<i><a href='#tocfunc11680'>Index</a></i><br>
2419
2420<pre>Instructs Selenium to return the specified answer string in response to
2421the next JavaScript prompt [window.prompt()].
2422
2423'answer' is the answer to give in response to the prompt pop-up
2424</pre>
2425<pre>(define (selenium::answer_on_next_prompt sel-sess answer)
2426            (selenium::do-command sel-sess &quot;answerOnNextPrompt&quot; answer ))
2427
2428
2429</pre>
2430<h4><a name='codefunc4497' href='#docfunc4497'>selenium::go_back</a></h4>
2431<i><a href='#tocfunc4497'>Index</a></i><br>
2432
2433<pre>Simulates the user clicking the &quot;back&quot; button on their browser.
2434
2435</pre>
2436<pre>(define (selenium::go_back sel-sess )
2437            (selenium::do-command sel-sess &quot;goBack&quot; ))
2438
2439
2440</pre>
2441<h4><a name='codefunc10148' href='#docfunc10148'>selenium::refresh</a></h4>
2442<i><a href='#tocfunc10148'>Index</a></i><br>
2443
2444<pre>Simulates the user clicking the &quot;Refresh&quot; button on their browser.
2445
2446</pre>
2447<pre>(define (selenium::refresh sel-sess )
2448            (selenium::do-command sel-sess &quot;refresh&quot; ))
2449
2450
2451</pre>
2452<h4><a name='codefunc48181' href='#docfunc48181'>selenium::close</a></h4>
2453<i><a href='#tocfunc48181'>Index</a></i><br>
2454
2455<pre>Simulates the user clicking the &quot;close&quot; button in the titlebar of a popup
2456window or tab.
2457
2458</pre>
2459<pre>(define (selenium::close sel-sess )
2460            (selenium::do-command sel-sess &quot;close&quot; ))
2461
2462
2463</pre>
2464<h4><a name='codefunc14937' href='#docfunc14937'>selenium::is_alert_present</a></h4>
2465<i><a href='#tocfunc14937'>Index</a></i><br>
2466
2467<pre>Has an alert occurred?
2468
2469
2470This function never throws an exception
2471
2472
2473
2474</pre>
2475<pre>(define (selenium::is_alert_present sel-sess )
2476            (selenium::get-boolean sel-sess &quot;isAlertPresent&quot; ))
2477
2478
2479</pre>
2480<h4><a name='codefunc21450' href='#docfunc21450'>selenium::is_prompt_present</a></h4>
2481<i><a href='#tocfunc21450'>Index</a></i><br>
2482
2483<pre>Has a prompt occurred?
2484
2485
2486This function never throws an exception
2487
2488
2489
2490</pre>
2491<pre>(define (selenium::is_prompt_present sel-sess )
2492            (selenium::get-boolean sel-sess &quot;isPromptPresent&quot; ))
2493
2494
2495</pre>
2496<h4><a name='codefunc36855' href='#docfunc36855'>selenium::is_confirmation_present</a></h4>
2497<i><a href='#tocfunc36855'>Index</a></i><br>
2498
2499<pre>Has confirm() been called?
2500
2501
2502This function never throws an exception
2503
2504
2505
2506</pre>
2507<pre>(define (selenium::is_confirmation_present sel-sess )
2508            (selenium::get-boolean sel-sess &quot;isConfirmationPresent&quot; ))
2509
2510
2511</pre>
2512<h4><a name='codefunc32788' href='#docfunc32788'>selenium::get_alert</a></h4>
2513<i><a href='#tocfunc32788'>Index</a></i><br>
2514
2515<pre>Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
2516
2517Getting an alert has the same effect as manually clicking OK. If an
2518alert is generated but you do not get/verify it, the next Selenium action
2519will fail.
2520NOTE: under Selenium, JavaScript alerts will NOT pop up a visible alert
2521dialog.
2522NOTE: Selenium does NOT support JavaScript alerts that are generated in a
2523page's onload() event handler. In this case a visible dialog WILL be
2524generated and Selenium will hang until someone manually clicks OK.
2525
2526
2527</pre>
2528<pre>(define (selenium::get_alert sel-sess )
2529            (selenium::get-string sel-sess &quot;getAlert&quot; ))
2530
2531
2532</pre>
2533<h4><a name='codefunc8806' href='#docfunc8806'>selenium::get_confirmation</a></h4>
2534<i><a href='#tocfunc8806'>Index</a></i><br>
2535
2536<pre>Retrieves the message of a JavaScript confirmation dialog generated during
2537the previous action.
2538
2539
2540By default, the confirm function will return true, having the same effect
2541as manually clicking OK. This can be changed by prior execution of the
2542chooseCancelOnNextConfirmation command. If an confirmation is generated
2543but you do not get/verify it, the next Selenium action will fail.
2544
2545
2546NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible
2547dialog.
2548
2549
2550NOTE: Selenium does NOT support JavaScript confirmations that are
2551generated in a page's onload() event handler. In this case a visible
2552dialog WILL be generated and Selenium will hang until you manually click
2553OK.
2554
2555
2556
2557</pre>
2558<pre>(define (selenium::get_confirmation sel-sess )
2559            (selenium::get-string sel-sess &quot;getConfirmation&quot; ))
2560
2561
2562</pre>
2563<h4><a name='codefunc62761' href='#docfunc62761'>selenium::get_prompt</a></h4>
2564<i><a href='#tocfunc62761'>Index</a></i><br>
2565
2566<pre>Retrieves the message of a JavaScript question prompt dialog generated during
2567the previous action.
2568
2569Successful handling of the prompt requires prior execution of the
2570answerOnNextPrompt command. If a prompt is generated but you
2571do not get/verify it, the next Selenium action will fail.
2572NOTE: under Selenium, JavaScript prompts will NOT pop up a visible
2573dialog.
2574NOTE: Selenium does NOT support JavaScript prompts that are generated in a
2575page's onload() event handler. In this case a visible dialog WILL be
2576generated and Selenium will hang until someone manually clicks OK.
2577
2578
2579</pre>
2580<pre>(define (selenium::get_prompt sel-sess )
2581            (selenium::get-string sel-sess &quot;getPrompt&quot; ))
2582
2583
2584</pre>
2585<h4><a name='codefunc18829' href='#docfunc18829'>selenium::get_location</a></h4>
2586<i><a href='#tocfunc18829'>Index</a></i><br>
2587
2588<pre>Gets the absolute URL of the current page.
2589
2590</pre>
2591<pre>(define (selenium::get_location sel-sess )
2592            (selenium::get-string sel-sess &quot;getLocation&quot; ))
2593
2594
2595</pre>
2596<h4><a name='codefunc30503' href='#docfunc30503'>selenium::get_title</a></h4>
2597<i><a href='#tocfunc30503'>Index</a></i><br>
2598
2599<pre>Gets the title of the current page.
2600
2601</pre>
2602<pre>(define (selenium::get_title sel-sess )
2603            (selenium::get-string sel-sess &quot;getTitle&quot; ))
2604
2605
2606</pre>
2607<h4><a name='codefunc30425' href='#docfunc30425'>selenium::get_body_text</a></h4>
2608<i><a href='#tocfunc30425'>Index</a></i><br>
2609
2610<pre>Gets the entire text of the page.
2611
2612</pre>
2613<pre>(define (selenium::get_body_text sel-sess )
2614            (selenium::get-string sel-sess &quot;getBodyText&quot; ))
2615
2616
2617</pre>
2618<h4><a name='codefunc30753' href='#docfunc30753'>selenium::get_value</a></h4>
2619<i><a href='#tocfunc30753'>Index</a></i><br>
2620
2621<pre>Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
2622For checkbox/radio elements, the value will be &quot;on&quot; or &quot;off&quot; depending on
2623whether the element is checked or not.
2624
2625'locator' is an element locator
2626</pre>
2627<pre>(define (selenium::get_value sel-sess locator)
2628            (selenium::get-string sel-sess &quot;getValue&quot; locator ))
2629
2630
2631</pre>
2632<h4><a name='codefunc31430' href='#docfunc31430'>selenium::get_text</a></h4>
2633<i><a href='#tocfunc31430'>Index</a></i><br>
2634
2635<pre>Gets the text of an element. This works for any element that contains
2636text. This command uses either the textContent (Mozilla-like browsers) or
2637the innerText (IE-like browsers) of the element, which is the rendered
2638text shown to the user.
2639
2640'locator' is an element locator
2641</pre>
2642<pre>(define (selenium::get_text sel-sess locator)
2643            (selenium::get-string sel-sess &quot;getText&quot; locator ))
2644
2645
2646</pre>
2647<h4><a name='codefunc32789' href='#docfunc32789'>selenium::highlight</a></h4>
2648<i><a href='#tocfunc32789'>Index</a></i><br>
2649
2650<pre>Briefly changes the backgroundColor of the specified element yellow.  Useful for debugging.
2651
2652'locator' is an element locator
2653</pre>
2654<pre>(define (selenium::highlight sel-sess locator)
2655            (selenium::do-command sel-sess &quot;highlight&quot; locator ))
2656
2657
2658</pre>
2659<h4><a name='codefunc33696' href='#docfunc33696'>selenium::get_eval</a></h4>
2660<i><a href='#tocfunc33696'>Index</a></i><br>
2661
2662<pre>Gets the result of evaluating the specified JavaScript snippet.  The snippet may
2663have multiple lines, but only the result of the last line will be returned.
2664
2665Note that, by default, the snippet will run in the context of the &quot;selenium&quot;
2666object itself, so &lt;tt&gt;this&lt;/tt&gt; will refer to the Selenium object.  Use &lt;tt&gt;window&lt;/tt&gt; to
2667refer to the window of your application, e.g. &lt;tt&gt;window.document.getElementById('foo')&lt;/tt&gt;
2668If you need to use
2669a locator to refer to a single element in your application page, you can
2670use &lt;tt&gt;this.browserbot.findElement(&quot;id=foo&quot;)&lt;/tt&gt; where &quot;id=foo&quot; is your locator.
2671
2672
2673'script' is the JavaScript snippet to run
2674</pre>
2675<pre>(define (selenium::get_eval sel-sess script)
2676            (selenium::get-string sel-sess &quot;getEval&quot; script ))
2677
2678
2679</pre>
2680<h4><a name='codefunc59383' href='#docfunc59383'>selenium::is_checked</a></h4>
2681<i><a href='#tocfunc59383'>Index</a></i><br>
2682
2683<pre>Gets whether a toggle-button (checkbox/radio) is checked.  Fails if the specified element doesn't exist or isn't a toggle-button.
2684
2685'locator' is an element locator pointing to a checkbox or radio button
2686</pre>
2687<pre>(define (selenium::is_checked sel-sess locator)
2688            (selenium::get-boolean sel-sess &quot;isChecked&quot; locator ))
2689
2690
2691</pre>
2692<h4><a name='codefunc28437' href='#docfunc28437'>selenium::get_table</a></h4>
2693<i><a href='#tocfunc28437'>Index</a></i><br>
2694
2695<pre>Gets the text from a cell of a table. The cellAddress syntax
2696tableLocator.row.column, where row and column start at 0.
2697
2698'tableCellAddress' is a cell address, e.g. &quot;foo.1.4&quot;
2699</pre>
2700<pre>(define (selenium::get_table sel-sess tableCellAddress)
2701            (selenium::get-string sel-sess &quot;getTable&quot; tableCellAddress ))
2702
2703
2704</pre>
2705<h4><a name='codefunc32795' href='#docfunc32795'>selenium::get_selected_labels</a></h4>
2706<i><a href='#tocfunc32795'>Index</a></i><br>
2707
2708<pre>Gets all option labels (visible text) for selected options in the specified select or multi-select element.
2709
2710'selectLocator' is an element locator identifying a drop-down menu
2711</pre>
2712<pre>(define (selenium::get_selected_labels sel-sess selectLocator)
2713            (selenium::get-string-array sel-sess &quot;getSelectedLabels&quot; selectLocator ))
2714
2715
2716</pre>
2717<h4><a name='codefunc32680' href='#docfunc32680'>selenium::get_selected_label</a></h4>
2718<i><a href='#tocfunc32680'>Index</a></i><br>
2719
2720<pre>Gets option label (visible text) for selected option in the specified select element.
2721
2722'selectLocator' is an element locator identifying a drop-down menu
2723</pre>
2724<pre>(define (selenium::get_selected_label sel-sess selectLocator)
2725            (selenium::get-string sel-sess &quot;getSelectedLabel&quot; selectLocator ))
2726
2727
2728</pre>
2729<h4><a name='codefunc36139' href='#docfunc36139'>selenium::get_selected_values</a></h4>
2730<i><a href='#tocfunc36139'>Index</a></i><br>
2731
2732<pre>Gets all option values (value attributes) for selected options in the specified select or multi-select element.
2733
2734'selectLocator' is an element locator identifying a drop-down menu
2735</pre>
2736<pre>(define (selenium::get_selected_values sel-sess selectLocator)
2737            (selenium::get-string-array sel-sess &quot;getSelectedValues&quot; selectLocator ))
2738
2739
2740</pre>
2741<h4><a name='codefunc36024' href='#docfunc36024'>selenium::get_selected_value</a></h4>
2742<i><a href='#tocfunc36024'>Index</a></i><br>
2743
2744<pre>Gets option value (value attribute) for selected option in the specified select element.
2745
2746'selectLocator' is an element locator identifying a drop-down menu
2747</pre>
2748<pre>(define (selenium::get_selected_value sel-sess selectLocator)
2749            (selenium::get-string sel-sess &quot;getSelectedValue&quot; selectLocator ))
2750
2751
2752</pre>
2753<h4><a name='codefunc65050' href='#docfunc65050'>selenium::get_selected_indexes</a></h4>
2754<i><a href='#tocfunc65050'>Index</a></i><br>
2755
2756<pre>Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
2757
2758'selectLocator' is an element locator identifying a drop-down menu
2759</pre>
2760<pre>(define (selenium::get_selected_indexes sel-sess selectLocator)
2761            (selenium::get-string-array sel-sess &quot;getSelectedIndexes&quot; selectLocator ))
2762
2763
2764</pre>
2765<h4><a name='codefunc35509' href='#docfunc35509'>selenium::get_selected_index</a></h4>
2766<i><a href='#tocfunc35509'>Index</a></i><br>
2767
2768<pre>Gets option index (option number, starting at 0) for selected option in the specified select element.
2769
2770'selectLocator' is an element locator identifying a drop-down menu
2771</pre>
2772<pre>(define (selenium::get_selected_index sel-sess selectLocator)
2773            (selenium::get-string sel-sess &quot;getSelectedIndex&quot; selectLocator ))
2774
2775
2776</pre>
2777<h4><a name='codefunc8518' href='#docfunc8518'>selenium::get_selected_ids</a></h4>
2778<i><a href='#tocfunc8518'>Index</a></i><br>
2779
2780<pre>Gets all option element IDs for selected options in the specified select or multi-select element.
2781
2782'selectLocator' is an element locator identifying a drop-down menu
2783</pre>
2784<pre>(define (selenium::get_selected_ids sel-sess selectLocator)
2785            (selenium::get-string-array sel-sess &quot;getSelectedIds&quot; selectLocator ))
2786
2787
2788</pre>
2789<h4><a name='codefunc44613' href='#docfunc44613'>selenium::get_selected_id</a></h4>
2790<i><a href='#tocfunc44613'>Index</a></i><br>
2791
2792<pre>Gets option element ID for selected option in the specified select element.
2793
2794'selectLocator' is an element locator identifying a drop-down menu
2795</pre>
2796<pre>(define (selenium::get_selected_id sel-sess selectLocator)
2797            (selenium::get-string sel-sess &quot;getSelectedId&quot; selectLocator ))
2798
2799
2800</pre>
2801<h4><a name='codefunc7797' href='#docfunc7797'>selenium::is_something_selected</a></h4>
2802<i><a href='#tocfunc7797'>Index</a></i><br>
2803
2804<pre>Determines whether some option in a drop-down menu is selected.
2805
2806'selectLocator' is an element locator identifying a drop-down menu
2807</pre>
2808<pre>(define (selenium::is_something_selected sel-sess selectLocator)
2809            (selenium::get-boolean sel-sess &quot;isSomethingSelected&quot; selectLocator ))
2810
2811
2812</pre>
2813<h4><a name='codefunc42692' href='#docfunc42692'>selenium::get_select_options</a></h4>
2814<i><a href='#tocfunc42692'>Index</a></i><br>
2815
2816<pre>Gets all option labels in the specified select drop-down.
2817
2818'selectLocator' is an element locator identifying a drop-down menu
2819</pre>
2820<pre>(define (selenium::get_select_options sel-sess selectLocator)
2821            (selenium::get-string-array sel-sess &quot;getSelectOptions&quot; selectLocator ))
2822
2823
2824</pre>
2825<h4><a name='codefunc24307' href='#docfunc24307'>selenium::get_attribute</a></h4>
2826<i><a href='#tocfunc24307'>Index</a></i><br>
2827
2828<pre>Gets the value of an element attribute.
2829
2830'attributeLocator' is an element locator followed by an @ sign and then the name of the attribute, e.g. &quot;foo@bar&quot;
2831</pre>
2832<pre>(define (selenium::get_attribute sel-sess attributeLocator)
2833            (selenium::get-string sel-sess &quot;getAttribute&quot; attributeLocator ))
2834
2835
2836</pre>
2837<h4><a name='codefunc61519' href='#docfunc61519'>selenium::is_text_present</a></h4>
2838<i><a href='#tocfunc61519'>Index</a></i><br>
2839
2840<pre>Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
2841
2842'pattern' is a pattern to match with the text of the page
2843</pre>
2844<pre>(define (selenium::is_text_present sel-sess pattern)
2845            (selenium::get-boolean sel-sess &quot;isTextPresent&quot; pattern ))
2846
2847
2848</pre>
2849<h4><a name='codefunc41922' href='#docfunc41922'>selenium::is_element_present</a></h4>
2850<i><a href='#tocfunc41922'>Index</a></i><br>
2851
2852<pre>Verifies that the specified element is somewhere on the page.
2853
2854'locator' is an element locator
2855</pre>
2856<pre>(define (selenium::is_element_present sel-sess locator)
2857            (selenium::get-boolean sel-sess &quot;isElementPresent&quot; locator ))
2858
2859
2860</pre>
2861<h4><a name='codefunc262' href='#docfunc262'>selenium::is_visible</a></h4>
2862<i><a href='#tocfunc262'>Index</a></i><br>
2863
2864<pre>Determines if the specified element is visible. An
2865element can be rendered invisible by setting the CSS &quot;visibility&quot;
2866property to &quot;hidden&quot;, or the &quot;display&quot; property to &quot;none&quot;, either for the
2867element itself or one if its ancestors.  This method will fail if
2868the element is not present.
2869
2870'locator' is an element locator
2871</pre>
2872<pre>(define (selenium::is_visible sel-sess locator)
2873            (selenium::get-boolean sel-sess &quot;isVisible&quot; locator ))
2874
2875
2876</pre>
2877<h4><a name='codefunc60518' href='#docfunc60518'>selenium::is_editable</a></h4>
2878<i><a href='#tocfunc60518'>Index</a></i><br>
2879
2880<pre>Determines whether the specified input element is editable, ie hasn't been disabled.
2881This method will fail if the specified element isn't an input element.
2882
2883'locator' is an element locator
2884</pre>
2885<pre>(define (selenium::is_editable sel-sess locator)
2886            (selenium::get-boolean sel-sess &quot;isEditable&quot; locator ))
2887
2888
2889</pre>
2890<h4><a name='codefunc50528' href='#docfunc50528'>selenium::get_all_buttons</a></h4>
2891<i><a href='#tocfunc50528'>Index</a></i><br>
2892
2893<pre>Returns the IDs of all buttons on the page.
2894
2895If a given button has no ID, it will appear as &quot;&quot; in this array.
2896
2897
2898</pre>
2899<pre>(define (selenium::get_all_buttons sel-sess )
2900            (selenium::get-string-array sel-sess &quot;getAllButtons&quot; ))
2901
2902
2903</pre>
2904<h4><a name='codefunc16885' href='#docfunc16885'>selenium::get_all_links</a></h4>
2905<i><a href='#tocfunc16885'>Index</a></i><br>
2906
2907<pre>Returns the IDs of all links on the page.
2908
2909If a given link has no ID, it will appear as &quot;&quot; in this array.
2910
2911
2912</pre>
2913<pre>(define (selenium::get_all_links sel-sess )
2914            (selenium::get-string-array sel-sess &quot;getAllLinks&quot; ))
2915
2916
2917</pre>
2918<h4><a name='codefunc46551' href='#docfunc46551'>selenium::get_all_fields</a></h4>
2919<i><a href='#tocfunc46551'>Index</a></i><br>
2920
2921<pre>Returns the IDs of all input fields on the page.
2922
2923If a given field has no ID, it will appear as &quot;&quot; in this array.
2924
2925
2926</pre>
2927<pre>(define (selenium::get_all_fields sel-sess )
2928            (selenium::get-string-array sel-sess &quot;getAllFields&quot; ))
2929
2930
2931</pre>
2932<h4><a name='codefunc13370' href='#docfunc13370'>selenium::get_attribute_from_all_windows</a></h4>
2933<i><a href='#tocfunc13370'>Index</a></i><br>
2934
2935<pre>Returns every instance of some attribute from all known windows.
2936
2937'attributeName' is name of an attribute on the windows
2938</pre>
2939<pre>(define (selenium::get_attribute_from_all_windows sel-sess attributeName)
2940            (selenium::get-string-array sel-sess &quot;getAttributeFromAllWindows&quot; attributeName ))
2941
2942
2943</pre>
2944<h4><a name='codefunc39063' href='#docfunc39063'>selenium::dragdrop</a></h4>
2945<i><a href='#tocfunc39063'>Index</a></i><br>
2946
2947<pre>deprecated - use dragAndDrop instead
2948
2949'locator' is an element locator
2950'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., &quot;+70,-300&quot;
2951</pre>
2952<pre>(define (selenium::dragdrop sel-sess locator movementsString)
2953            (selenium::do-command sel-sess &quot;dragdrop&quot; locator movementsString ))
2954
2955
2956</pre>
2957<h4><a name='codefunc47466' href='#docfunc47466'>selenium::set_mouse_speed</a></h4>
2958<i><a href='#tocfunc47466'>Index</a></i><br>
2959
2960<pre>Configure the number of pixels between &quot;mousemove&quot; events during dragAndDrop commands (default=10).
2961Setting this value to 0 means that we'll send a &quot;mousemove&quot; event to every single pixel
2962in between the start location and the end location; that can be very slow, and may
2963cause some browsers to force the JavaScript to timeout.
2964If the mouse speed is greater than the distance between the two dragged objects, we'll
2965just send one &quot;mousemove&quot; at the start location and then one final one at the end location.
2966
2967
2968'pixels' is the number of pixels between &quot;mousemove&quot; events
2969</pre>
2970<pre>(define (selenium::set_mouse_speed sel-sess pixels)
2971            (selenium::do-command sel-sess &quot;setMouseSpeed&quot; pixels ))
2972
2973
2974</pre>
2975<h4><a name='codefunc47454' href='#docfunc47454'>selenium::get_mouse_speed</a></h4>
2976<i><a href='#tocfunc47454'>Index</a></i><br>
2977
2978<pre>Returns the number of pixels between &quot;mousemove&quot; events during dragAndDrop commands (default=10).
2979
2980</pre>
2981<pre>(define (selenium::get_mouse_speed sel-sess )
2982            (selenium::get-number sel-sess &quot;getMouseSpeed&quot; ))
2983
2984
2985</pre>
2986<h4><a name='codefunc20435' href='#docfunc20435'>selenium::drag_and_drop</a></h4>
2987<i><a href='#tocfunc20435'>Index</a></i><br>
2988
2989<pre>Drags an element a certain distance and then drops it
2990
2991'locator' is an element locator
2992'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., &quot;+70,-300&quot;
2993</pre>
2994<pre>(define (selenium::drag_and_drop sel-sess locator movementsString)
2995            (selenium::do-command sel-sess &quot;dragAndDrop&quot; locator movementsString ))
2996
2997
2998</pre>
2999<h4><a name='codefunc23523' href='#docfunc23523'>selenium::drag_and_drop_to_object</a></h4>
3000<i><a href='#tocfunc23523'>Index</a></i><br>
3001
3002<pre>Drags an element and drops it on another element
3003
3004'locatorOfObjectToBeDragged' is an element to be dragged
3005'locatorOfDragDestinationObject' is an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged  is dropped
3006</pre>
3007<pre>(define (selenium::drag_and_drop_to_object sel-sess locatorOfObjectToBeDragged locatorOfDragDestinationObject)
3008            (selenium::do-command sel-sess &quot;dragAndDropToObject&quot; locatorOfObjectToBeDragged locatorOfDragDestinationObject ))
3009
3010
3011</pre>
3012<h4><a name='codefunc24215' href='#docfunc24215'>selenium::window_focus</a></h4>
3013<i><a href='#tocfunc24215'>Index</a></i><br>
3014
3015<pre>Gives focus to the currently selected window
3016
3017</pre>
3018<pre>(define (selenium::window_focus sel-sess )
3019            (selenium::do-command sel-sess &quot;windowFocus&quot; ))
3020
3021
3022</pre>
3023<h4><a name='codefunc61259' href='#docfunc61259'>selenium::window_maximize</a></h4>
3024<i><a href='#tocfunc61259'>Index</a></i><br>
3025
3026<pre>Resize currently selected window to take up the entire screen
3027
3028</pre>
3029<pre>(define (selenium::window_maximize sel-sess )
3030            (selenium::do-command sel-sess &quot;windowMaximize&quot; ))
3031
3032
3033</pre>
3034<h4><a name='codefunc36544' href='#docfunc36544'>selenium::get_all_window_ids</a></h4>
3035<i><a href='#tocfunc36544'>Index</a></i><br>
3036
3037<pre>Returns the IDs of all windows that the browser knows about.
3038
3039</pre>
3040<pre>(define (selenium::get_all_window_ids sel-sess )
3041            (selenium::get-string-array sel-sess &quot;getAllWindowIds&quot; ))
3042
3043
3044</pre>
3045<h4><a name='codefunc291' href='#docfunc291'>selenium::get_all_window_names</a></h4>
3046<i><a href='#tocfunc291'>Index</a></i><br>
3047
3048<pre>Returns the names of all windows that the browser knows about.
3049
3050</pre>
3051<pre>(define (selenium::get_all_window_names sel-sess )
3052            (selenium::get-string-array sel-sess &quot;getAllWindowNames&quot; ))
3053
3054
3055</pre>
3056<h4><a name='codefunc165' href='#docfunc165'>selenium::get_all_window_titles</a></h4>
3057<i><a href='#tocfunc165'>Index</a></i><br>
3058
3059<pre>Returns the titles of all windows that the browser knows about.
3060
3061</pre>
3062<pre>(define (selenium::get_all_window_titles sel-sess )
3063            (selenium::get-string-array sel-sess &quot;getAllWindowTitles&quot; ))
3064
3065
3066</pre>
3067<h4><a name='codefunc52821' href='#docfunc52821'>selenium::get_html_source</a></h4>
3068<i><a href='#tocfunc52821'>Index</a></i><br>
3069
3070<pre>Returns the entire HTML source between the opening and
3071closing &quot;html&quot; tags.
3072
3073</pre>
3074<pre>(define (selenium::get_html_source sel-sess )
3075            (selenium::get-string sel-sess &quot;getHtmlSource&quot; ))
3076
3077
3078</pre>
3079<h4><a name='codefunc50234' href='#docfunc50234'>selenium::set_cursor_position</a></h4>
3080<i><a href='#tocfunc50234'>Index</a></i><br>
3081
3082<pre>Moves the text cursor to the specified position in the given input element or textarea.
3083This method will fail if the specified element isn't an input element or textarea.
3084
3085'locator' is an element locator pointing to an input element or textarea
3086'position' is the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field.  You can also set the cursor to -1 to move it to the end of the field.
3087</pre>
3088<pre>(define (selenium::set_cursor_position sel-sess locator position)
3089            (selenium::do-command sel-sess &quot;setCursorPosition&quot; locator position ))
3090
3091
3092</pre>
3093<h4><a name='codefunc7364' href='#docfunc7364'>selenium::get_element_index</a></h4>
3094<i><a href='#tocfunc7364'>Index</a></i><br>
3095
3096<pre>Get the relative index of an element to its parent (starting from 0). The comment node and empty text node
3097will be ignored.
3098
3099'locator' is an element locator pointing to an element
3100</pre>
3101<pre>(define (selenium::get_element_index sel-sess locator)
3102            (selenium::get-number sel-sess &quot;getElementIndex&quot; locator ))
3103
3104
3105</pre>
3106<h4><a name='codefunc64003' href='#docfunc64003'>selenium::is_ordered</a></h4>
3107<i><a href='#tocfunc64003'>Index</a></i><br>
3108
3109<pre>Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will
3110not be considered ordered.
3111
3112'locator1' is an element locator pointing to the first element
3113'locator2' is an element locator pointing to the second element
3114</pre>
3115<pre>(define (selenium::is_ordered sel-sess locator1 locator2)
3116            (selenium::get-boolean sel-sess &quot;isOrdered&quot; locator1 locator2 ))
3117
3118
3119</pre>
3120<h4><a name='codefunc52350' href='#docfunc52350'>selenium::get_element_position_left</a></h4>
3121<i><a href='#tocfunc52350'>Index</a></i><br>
3122
3123<pre>Retrieves the horizontal position of an element
3124
3125'locator' is an element locator pointing to an element OR an element itself
3126</pre>
3127<pre>(define (selenium::get_element_position_left sel-sess locator)
3128            (selenium::get-number sel-sess &quot;getElementPositionLeft&quot; locator ))
3129
3130
3131</pre>
3132<h4><a name='codefunc56852' href='#docfunc56852'>selenium::get_element_position_top</a></h4>
3133<i><a href='#tocfunc56852'>Index</a></i><br>
3134
3135<pre>Retrieves the vertical position of an element
3136
3137'locator' is an element locator pointing to an element OR an element itself
3138</pre>
3139<pre>(define (selenium::get_element_position_top sel-sess locator)
3140            (selenium::get-number sel-sess &quot;getElementPositionTop&quot; locator ))
3141
3142
3143</pre>
3144<h4><a name='codefunc9922' href='#docfunc9922'>selenium::get_element_width</a></h4>
3145<i><a href='#tocfunc9922'>Index</a></i><br>
3146
3147<pre>Retrieves the width of an element
3148
3149'locator' is an element locator pointing to an element
3150</pre>
3151<pre>(define (selenium::get_element_width sel-sess locator)
3152            (selenium::get-number sel-sess &quot;getElementWidth&quot; locator ))
3153
3154
3155</pre>
3156<h4><a name='codefunc35256' href='#docfunc35256'>selenium::get_element_height</a></h4>
3157<i><a href='#tocfunc35256'>Index</a></i><br>
3158
3159<pre>Retrieves the height of an element
3160
3161'locator' is an element locator pointing to an element
3162</pre>
3163<pre>(define (selenium::get_element_height sel-sess locator)
3164            (selenium::get-number sel-sess &quot;getElementHeight&quot; locator ))
3165
3166
3167</pre>
3168<h4><a name='codefunc50222' href='#docfunc50222'>selenium::get_cursor_position</a></h4>
3169<i><a href='#tocfunc50222'>Index</a></i><br>
3170
3171<pre>Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
3172
3173Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to
3174return the position of the last location of the cursor, even though the cursor is now gone from the page.  This is filed as SEL-243.
3175
3176This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
3177
3178'locator' is an element locator pointing to an input element or textarea
3179</pre>
3180<pre>(define (selenium::get_cursor_position sel-sess locator)
3181            (selenium::get-number sel-sess &quot;getCursorPosition&quot; locator ))
3182
3183
3184</pre>
3185<h4><a name='codefunc55031' href='#docfunc55031'>selenium::get_expression</a></h4>
3186<i><a href='#tocfunc55031'>Index</a></i><br>
3187
3188<pre>Returns the specified expression.
3189
3190This is useful because of JavaScript preprocessing.
3191It is used to generate commands like assertExpression and waitForExpression.
3192
3193
3194'expression' is the value to return
3195</pre>
3196<pre>(define (selenium::get_expression sel-sess expression)
3197            (selenium::get-string sel-sess &quot;getExpression&quot; expression ))
3198
3199
3200</pre>
3201<h4><a name='codefunc50024' href='#docfunc50024'>selenium::get_xpath_count</a></h4>
3202<i><a href='#tocfunc50024'>Index</a></i><br>
3203
3204<pre>Returns the number of nodes that match the specified xpath, eg. &quot;//table&quot; would give
3205the number of tables.
3206
3207'xpath' is the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
3208</pre>
3209<pre>(define (selenium::get_xpath_count sel-sess xpath)
3210            (selenium::get-number sel-sess &quot;getXpathCount&quot; xpath ))
3211
3212
3213</pre>
3214<h4><a name='codefunc37117' href='#docfunc37117'>selenium::assign_id</a></h4>
3215<i><a href='#tocfunc37117'>Index</a></i><br>
3216
3217<pre>Temporarily sets the &quot;id&quot; attribute of the specified element, so you can locate it in the future
3218using its ID rather than a slow/complicated XPath.  This ID will disappear once the page is
3219reloaded.
3220
3221'locator' is an element locator pointing to an element
3222'identifier' is a string to be used as the ID of the specified element
3223</pre>
3224<pre>(define (selenium::assign_id sel-sess locator identifier)
3225            (selenium::do-command sel-sess &quot;assignId&quot; locator identifier ))
3226
3227
3228</pre>
3229<h4><a name='codefunc35296' href='#docfunc35296'>selenium::allow_native_xpath</a></h4>
3230<i><a href='#tocfunc35296'>Index</a></i><br>
3231
3232<pre>Specifies whether Selenium should use the native in-browser implementation
3233of XPath (if any native version is available); if you pass &quot;false&quot; to
3234this function, we will always use our pure-JavaScript xpath library.
3235Using the pure-JS xpath library can improve the consistency of xpath
3236element locators between different browser vendors, but the pure-JS
3237version is much slower than the native implementations.
3238
3239'allow' is boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath
3240</pre>
3241<pre>(define (selenium::allow_native_xpath sel-sess allow)
3242            (selenium::do-command sel-sess &quot;allowNativeXpath&quot; allow ))
3243
3244
3245</pre>
3246<h4><a name='codefunc40388' href='#docfunc40388'>selenium::wait_for_condition</a></h4>
3247<i><a href='#tocfunc40388'>Index</a></i><br>
3248
3249<pre>Runs the specified JavaScript snippet repeatedly until it evaluates to &quot;true&quot;.
3250The snippet may have multiple lines, but only the result of the last line
3251will be considered.
3252
3253Note that, by default, the snippet will be run in the runner's test window, not in the window
3254of your application.  To get the window of your application, you can use
3255the JavaScript snippet &lt;tt&gt;selenium.browserbot.getCurrentWindow()&lt;/tt&gt;, and then
3256run your JavaScript in there
3257
3258
3259'script' is the JavaScript snippet to run
3260'timeout' is a timeout in milliseconds, after which this command will return with an error
3261</pre>
3262<pre>(define (selenium::wait_for_condition sel-sess script timeout)
3263            (selenium::do-command sel-sess &quot;waitForCondition&quot; script timeout ))
3264
3265
3266</pre>
3267<h4><a name='codefunc58794' href='#docfunc58794'>selenium::set_timeout</a></h4>
3268<i><a href='#tocfunc58794'>Index</a></i><br>
3269
3270<pre>Specifies the amount of time that Selenium will wait for actions to complete.
3271
3272Actions that require waiting include &quot;open&quot; and the &quot;waitFor*&quot; actions.
3273
3274The default timeout is 30 seconds.
3275
3276'timeout' is a timeout in milliseconds, after which the action will return with an error
3277</pre>
3278<pre>(define (selenium::set_timeout sel-sess timeout)
3279            (selenium::do-command sel-sess &quot;setTimeout&quot; timeout ))
3280
3281
3282</pre>
3283<h4><a name='codefunc65402' href='#docfunc65402'>selenium::wait_for_page_to_load</a></h4>
3284<i><a href='#tocfunc65402'>Index</a></i><br>
3285
3286<pre>Waits for a new page to load.
3287
3288You can use this command instead of the &quot;AndWait&quot; suffixes, &quot;clickAndWait&quot;, &quot;selectAndWait&quot;, &quot;typeAndWait&quot; etc.
3289(which are only available in the JS API).
3290Selenium constantly keeps track of new pages loading, and sets a &quot;newPageLoaded&quot;
3291flag when it first notices a page load.  Running any other Selenium command after
3292turns the flag to false.  Hence, if you want to wait for a page to load, you must
3293wait immediately after a Selenium command that caused a page-load.
3294
3295
3296'timeout' is a timeout in milliseconds, after which this command will return with an error
3297</pre>
3298<pre>(define (selenium::wait_for_page_to_load sel-sess timeout)
3299            (selenium::do-command sel-sess &quot;waitForPageToLoad&quot; timeout ))
3300
3301
3302</pre>
3303<h4><a name='codefunc24457' href='#docfunc24457'>selenium::wait_for_frame_to_load</a></h4>
3304<i><a href='#tocfunc24457'>Index</a></i><br>
3305
3306<pre>Waits for a new frame to load.
3307
3308Selenium constantly keeps track of new pages and frames loading,
3309and sets a &quot;newPageLoaded&quot; flag when it first notices a page load.
3310
3311
3312See waitForPageToLoad for more information.
3313
3314'frameAddress' is FrameAddress from the server side
3315'timeout' is a timeout in milliseconds, after which this command will return with an error
3316</pre>
3317<pre>(define (selenium::wait_for_frame_to_load sel-sess frameAddress timeout)
3318            (selenium::do-command sel-sess &quot;waitForFrameToLoad&quot; frameAddress timeout ))
3319
3320
3321</pre>
3322<h4><a name='codefunc57621' href='#docfunc57621'>selenium::get_cookie</a></h4>
3323<i><a href='#tocfunc57621'>Index</a></i><br>
3324
3325<pre>Return all cookies of the current page under test.
3326
3327</pre>
3328<pre>(define (selenium::get_cookie sel-sess )
3329            (selenium::get-string sel-sess &quot;getCookie&quot; ))
3330
3331
3332</pre>
3333<h4><a name='codefunc20954' href='#docfunc20954'>selenium::create_cookie</a></h4>
3334<i><a href='#tocfunc20954'>Index</a></i><br>
3335
3336<pre>Create a new cookie whose path and domain are same with those of current page
3337under test, unless you specified a path for this cookie explicitly.
3338
3339'nameValuePair' is name and value of the cookie in a format &quot;name=value&quot;
3340'optionsString' is options for the cookie. Currently supported options include 'path' and 'max_age'.      the optionsString's format is &quot;path=/path/, max_age=60&quot;. The order of options are irrelevant, the unit      of the value of 'max_age' is second.
3341</pre>
3342<pre>(define (selenium::create_cookie sel-sess nameValuePair optionsString)
3343            (selenium::do-command sel-sess &quot;createCookie&quot; nameValuePair optionsString ))
3344
3345
3346</pre>
3347<h4><a name='codefunc18658' href='#docfunc18658'>selenium::delete_cookie</a></h4>
3348<i><a href='#tocfunc18658'>Index</a></i><br>
3349
3350<pre>Delete a named cookie with specified path.
3351
3352'name' is the name of the cookie to be deleted
3353'path' is the path property of the cookie to be deleted
3354</pre>
3355<pre>(define (selenium::delete_cookie sel-sess name path)
3356            (selenium::do-command sel-sess &quot;deleteCookie&quot; name path ))
3357
3358
3359</pre>
3360<h4><a name='codefunc59839' href='#docfunc59839'>selenium::set_browser_log_level</a></h4>
3361<i><a href='#tocfunc59839'>Index</a></i><br>
3362
3363<pre>Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
3364Valid logLevel strings are: &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot; or &quot;off&quot;.
3365To see the browser logs, you need to
3366either show the log window in GUI mode, or enable browser-side logging in Selenium RC.
3367
3368'logLevel' is one of the following: &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot; or &quot;off&quot;
3369</pre>
3370<pre>(define (selenium::set_browser_log_level sel-sess logLevel)
3371            (selenium::do-command sel-sess &quot;setBrowserLogLevel&quot; logLevel ))
3372
3373
3374</pre>
3375<h4><a name='codefunc62004' href='#docfunc62004'>selenium::run_script</a></h4>
3376<i><a href='#tocfunc62004'>Index</a></i><br>
3377
3378<pre>Creates a new &quot;script&quot; tag in the body of the current test window, and
3379adds the specified text into the body of the command.  Scripts run in
3380this way can often be debugged more easily than scripts executed using
3381Selenium's &quot;getEval&quot; command.  Beware that JS exceptions thrown in these script
3382tags aren't managed by Selenium, so you should probably wrap your script
3383in try/catch blocks if there is any chance that the script will throw
3384an exception.
3385
3386'script' is the JavaScript snippet to run
3387</pre>
3388<pre>(define (selenium::run_script sel-sess script)
3389            (selenium::do-command sel-sess &quot;runScript&quot; script ))
3390
3391
3392</pre>
3393<h4><a name='codefunc2699' href='#docfunc2699'>selenium::add_location_strategy</a></h4>
3394<i><a href='#tocfunc2699'>Index</a></i><br>
3395
3396<pre>Defines a new function for Selenium to locate elements on the page.
3397For example,
3398if you define the strategy &quot;foo&quot;, and someone runs click(&quot;foo=blah&quot;), we'll
3399run your function, passing you the string &quot;blah&quot;, and click on the element
3400that your function
3401returns, or throw an &quot;Element not found&quot; error if your function returns null.
3402
3403We'll pass three arguments to your function:
3404locator: the string the user passed ininWindow: the currently selected windowinDocument: the currently selected document
3405
3406The function must return null if the element can't be found.
3407
3408'strategyName' is the name of the strategy to define; this should use only   letters [a-zA-Z] with no spaces or other punctuation.
3409'functionDefinition' is a string defining the body of a function in JavaScript.   For example: &lt;tt&gt;return inDocument.getElementById(locator);&lt;/tt&gt;
3410</pre>
3411<pre>(define (selenium::add_location_strategy sel-sess strategyName functionDefinition)
3412            (selenium::do-command sel-sess &quot;addLocationStrategy&quot; strategyName functionDefinition ))
3413
3414
3415</pre>
3416<h4><a name='codefunc64912' href='#docfunc64912'>selenium::set_context</a></h4>
3417<i><a href='#tocfunc64912'>Index</a></i><br>
3418
3419<pre>Writes a message to the status bar and adds a note to the browser-side
3420log.
3421
3422'context' is the message to be sent to the browser
3423</pre>
3424<pre>(define (selenium::set_context sel-sess context)
3425            (selenium::do-command sel-sess &quot;setContext&quot; context ))
3426
3427
3428</pre>
3429<h4><a name='codefunc38874' href='#docfunc38874'>selenium::capture_screenshot</a></h4>
3430<i><a href='#tocfunc38874'>Index</a></i><br>
3431
3432<pre>Captures a PNG screenshot to the specified file.
3433
3434'filename' is the absolute path to the file to be written, e.g. &quot;c:\blah\screenshot.png&quot;
3435</pre>
3436<pre>(define (selenium::capture_screenshot sel-sess filename)
3437            (selenium::do-command sel-sess &quot;captureScreenshot&quot; filename ))
3438
3439
3440
3441
3442
3443</pre></body></html>
Note: See TracBrowser for help on using the repository browser.