source: project/release/3/selenium/trunk/selenium-doc.html @ 9593

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

Initial Selenium RC egg check in.

  • Property svn:keywords set to Id
File size: 148.7 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 url protocol: 'HTTP/1.1)))]
1631     [result (begin
1632               (thread-start! http-thread)
1633               (format #t &quot;start done.\n&quot;)
1634               (thread-join! http-thread (selenium-session-timeout sel-sess) #f))])
1635    (format #t &quot;do-command verb: ~A.\n&quot; verb)
1636    (format #t &quot;do-command args: ~A.\n&quot; args)
1637    (format #t &quot;do-command url: ~A.\n&quot; url)
1638    (format #t &quot;do-command output: ~A.\n&quot; result)
1639    result))
1640
1641</pre>
1642<h4><a name='codefunc46125' href='#docfunc46125'>selenium::get-string</a></h4>
1643<i><a href='#tocfunc46125'>Index</a></i><br>
1644
1645<pre>Selenium strings start with &quot;OK,&quot;.  The rest is the string.
1646</pre>
1647<pre>(define (selenium::get-string sel-sess verb . args)
1648  (string-drop (apply selenium::do-command (cons* sel-sess verb args)) 3))
1649
1650</pre>
1651<h4><a name='codefunc47386' href='#docfunc47386'>selenium::get-number</a></h4>
1652<i><a href='#tocfunc47386'>Index</a></i><br>
1653
1654<pre>Just turn the Selenium string into a number
1655</pre>
1656<pre>(define (selenium::get-number sel-sess verb . args)
1657  (string-&gt;number (selenium::get-string sel-sess verb args)))
1658
1659</pre>
1660<h4><a name='codefunc44158' href='#docfunc44158'>selenium::get-boolean</a></h4>
1661<i><a href='#tocfunc44158'>Index</a></i><br>
1662
1663<pre>Selenium booleans are one of the literal strings &quot;true&quot; and
1664&quot;false&quot;
1665</pre>
1666<pre>(define (selenium::get-boolean sel-sess verb . args)
1667  (let
1668    ([str (selenium::get-string sel-sess verb args)])
1669    ; We let cond throw an exception if neither string matches
1670    (cond
1671      [(string=? &quot;true&quot; str) #t]
1672      [(string=? &quot;false&quot; str) #f])))
1673
1674</pre>
1675<h4><a name='codefunc303' href='#docfunc303'>selenium::get-string-array</a></h4>
1676<i><a href='#tocfunc303'>Index</a></i><br>
1677
1678<pre>Selenium arrays are comma-seperated strings, with \ escapes
1679</pre>
1680<pre>(define (selenium::get-string-array sel-sess verb . args)
1681  (map
1682    (lambda (str)
1683      (string-substitute &quot;(?&lt;!\\\\)\\\\&quot; &quot;&quot; str #t))
1684    (string-split-fields
1685      &quot;(?&lt;!\\\\),&quot;
1686      (selenium::get-string sel-sess verb args)
1687      #:infix)))
1688
1689</pre>
1690<h4><a name='codefunc1564' href='#docfunc1564'>selenium::get-number-array</a></h4>
1691<i><a href='#tocfunc1564'>Index</a></i><br>
1692
1693<pre>Just turn the array bits into numbers
1694</pre>
1695<pre>(define (selenium::get-number-array sel-sess verb . args)
1696  (map
1697    string-&gt;number
1698    (selenium::get-string-array sel-sess verb args)))
1699
1700</pre>
1701<h4><a name='codefunc1564' href='#docfunc1564'>selenium::get-number-array</a></h4>
1702<i><a href='#tocfunc1564'>Index</a></i><br>
1703
1704<pre>Selenium booleans are one of the literal strings &quot;true&quot; and
1705&quot;false&quot;; convert all the bits
1706</pre>
1707<pre>(define (selenium::get-number-array sel-sess verb . args)
1708  (map
1709    (lambda (str)
1710      (cond
1711        [(string=? &quot;true&quot; str) #t]
1712        [(string=? &quot;false&quot; str) #f]))
1713    (selenium::get-string-array sel-sess verb args)))
1714
1715</pre>
1716<h4><a name='codefunc49990' href='#docfunc49990'>selenium::start</a></h4>
1717<i><a href='#tocfunc49990'>Index</a></i><br>
1718
1719<pre>Start a Selenium session (that is, launch the browser)
1720</pre>
1721<pre>(define (selenium::start sel-sess)
1722  (selenium-session-session-id-set!
1723    sel-sess
1724    (selenium::get-string
1725      sel-sess
1726      &quot;getNewBrowserSession&quot;
1727      (selenium-session-browser-start-command sel-sess)
1728      (selenium-session-browser-url sel-sess))))
1729
1730</pre>
1731<h4><a name='codefunc49376' href='#docfunc49376'>selenium::stop</a></h4>
1732<i><a href='#tocfunc49376'>Index</a></i><br>
1733
1734<pre>Stop a Selenium session (that is, close the browser)
1735</pre>
1736<pre>(define (selenium::stop sel-sess)
1737  (selenium::do-command sel-sess &quot;testComplete&quot; '())
1738  (selenium-session-session-id-set! sel-sess #f))
1739
1740</pre>
1741<h4><a name='codefunc44085' href='#docfunc44085'>selenium::click</a></h4>
1742<i><a href='#tocfunc44085'>Index</a></i><br>
1743
1744<pre>Clicks on a link, button, checkbox or radio button. If the click action
1745causes a new page to load (like a link usually does), call
1746waitForPageToLoad.
1747
1748'locator' is an element locator
1749</pre>
1750<pre>(define (selenium::click sel-sess locator)
1751            (selenium::do-command sel-sess &quot;click&quot; locator ))
1752
1753
1754</pre>
1755<h4><a name='codefunc19315' href='#docfunc19315'>selenium::double_click</a></h4>
1756<i><a href='#tocfunc19315'>Index</a></i><br>
1757
1758<pre>Double clicks on a link, button, checkbox or radio button. If the double click action
1759causes a new page to load (like a link usually does), call
1760waitForPageToLoad.
1761
1762'locator' is an element locator
1763</pre>
1764<pre>(define (selenium::double_click sel-sess locator)
1765            (selenium::do-command sel-sess &quot;doubleClick&quot; locator ))
1766
1767
1768</pre>
1769<h4><a name='codefunc32663' href='#docfunc32663'>selenium::click_at</a></h4>
1770<i><a href='#tocfunc32663'>Index</a></i><br>
1771
1772<pre>Clicks on a link, button, checkbox or radio button. If the click action
1773causes a new page to load (like a link usually does), call
1774waitForPageToLoad.
1775
1776'locator' is an element locator
1777'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
1778</pre>
1779<pre>(define (selenium::click_at sel-sess locator coordString)
1780            (selenium::do-command sel-sess &quot;clickAt&quot; locator coordString ))
1781
1782
1783</pre>
1784<h4><a name='codefunc44358' href='#docfunc44358'>selenium::double_click_at</a></h4>
1785<i><a href='#tocfunc44358'>Index</a></i><br>
1786
1787<pre>Doubleclicks on a link, button, checkbox or radio button. If the action
1788causes a new page to load (like a link usually does), call
1789waitForPageToLoad.
1790
1791'locator' is an element locator
1792'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
1793</pre>
1794<pre>(define (selenium::double_click_at sel-sess locator coordString)
1795            (selenium::do-command sel-sess &quot;doubleClickAt&quot; locator coordString ))
1796
1797
1798</pre>
1799<h4><a name='codefunc59930' href='#docfunc59930'>selenium::fire_event</a></h4>
1800<i><a href='#tocfunc59930'>Index</a></i><br>
1801
1802<pre>Explicitly simulate an event, to trigger the corresponding &quot;on&lt;em&gt;event&lt;/em&gt;&quot;
1803handler.
1804
1805'locator' is an element locator
1806'eventName' is the event name, e.g. &quot;focus&quot; or &quot;blur&quot;
1807</pre>
1808<pre>(define (selenium::fire_event sel-sess locator eventName)
1809            (selenium::do-command sel-sess &quot;fireEvent&quot; locator eventName ))
1810
1811
1812</pre>
1813<h4><a name='codefunc34603' href='#docfunc34603'>selenium::key_press</a></h4>
1814<i><a href='#tocfunc34603'>Index</a></i><br>
1815
1816<pre>Simulates a user pressing and releasing a key.
1817
1818'locator' is an element locator
1819'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;.
1820</pre>
1821<pre>(define (selenium::key_press sel-sess locator keySequence)
1822            (selenium::do-command sel-sess &quot;keyPress&quot; locator keySequence ))
1823
1824
1825</pre>
1826<h4><a name='codefunc44303' href='#docfunc44303'>selenium::shift_key_down</a></h4>
1827<i><a href='#tocfunc44303'>Index</a></i><br>
1828
1829<pre>Press the shift key and hold it down until doShiftUp() is called or a new page is loaded.
1830
1831</pre>
1832<pre>(define (selenium::shift_key_down sel-sess )
1833            (selenium::do-command sel-sess &quot;shiftKeyDown&quot; ))
1834
1835
1836</pre>
1837<h4><a name='codefunc16297' href='#docfunc16297'>selenium::shift_key_up</a></h4>
1838<i><a href='#tocfunc16297'>Index</a></i><br>
1839
1840<pre>Release the shift key.
1841
1842</pre>
1843<pre>(define (selenium::shift_key_up sel-sess )
1844            (selenium::do-command sel-sess &quot;shiftKeyUp&quot; ))
1845
1846
1847</pre>
1848<h4><a name='codefunc25569' href='#docfunc25569'>selenium::meta_key_down</a></h4>
1849<i><a href='#tocfunc25569'>Index</a></i><br>
1850
1851<pre>Press the meta key and hold it down until doMetaUp() is called or a new page is loaded.
1852
1853</pre>
1854<pre>(define (selenium::meta_key_down sel-sess )
1855            (selenium::do-command sel-sess &quot;metaKeyDown&quot; ))
1856
1857
1858</pre>
1859<h4><a name='codefunc64883' href='#docfunc64883'>selenium::meta_key_up</a></h4>
1860<i><a href='#tocfunc64883'>Index</a></i><br>
1861
1862<pre>Release the meta key.
1863
1864</pre>
1865<pre>(define (selenium::meta_key_up sel-sess )
1866            (selenium::do-command sel-sess &quot;metaKeyUp&quot; ))
1867
1868
1869</pre>
1870<h4><a name='codefunc19092' href='#docfunc19092'>selenium::alt_key_down</a></h4>
1871<i><a href='#tocfunc19092'>Index</a></i><br>
1872
1873<pre>Press the alt key and hold it down until doAltUp() is called or a new page is loaded.
1874
1875</pre>
1876<pre>(define (selenium::alt_key_down sel-sess )
1877            (selenium::do-command sel-sess &quot;altKeyDown&quot; ))
1878
1879
1880</pre>
1881<h4><a name='codefunc56621' href='#docfunc56621'>selenium::alt_key_up</a></h4>
1882<i><a href='#tocfunc56621'>Index</a></i><br>
1883
1884<pre>Release the alt key.
1885
1886</pre>
1887<pre>(define (selenium::alt_key_up sel-sess )
1888            (selenium::do-command sel-sess &quot;altKeyUp&quot; ))
1889
1890
1891</pre>
1892<h4><a name='codefunc12655' href='#docfunc12655'>selenium::control_key_down</a></h4>
1893<i><a href='#tocfunc12655'>Index</a></i><br>
1894
1895<pre>Press the control key and hold it down until doControlUp() is called or a new page is loaded.
1896
1897</pre>
1898<pre>(define (selenium::control_key_down sel-sess )
1899            (selenium::do-command sel-sess &quot;controlKeyDown&quot; ))
1900
1901
1902</pre>
1903<h4><a name='codefunc50184' href='#docfunc50184'>selenium::control_key_up</a></h4>
1904<i><a href='#tocfunc50184'>Index</a></i><br>
1905
1906<pre>Release the control key.
1907
1908</pre>
1909<pre>(define (selenium::control_key_up sel-sess )
1910            (selenium::do-command sel-sess &quot;controlKeyUp&quot; ))
1911
1912
1913</pre>
1914<h4><a name='codefunc32446' href='#docfunc32446'>selenium::key_down</a></h4>
1915<i><a href='#tocfunc32446'>Index</a></i><br>
1916
1917<pre>Simulates a user pressing a key (without releasing it yet).
1918
1919'locator' is an element locator
1920'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;.
1921</pre>
1922<pre>(define (selenium::key_down sel-sess locator keySequence)
1923            (selenium::do-command sel-sess &quot;keyDown&quot; locator keySequence ))
1924
1925
1926</pre>
1927<h4><a name='codefunc4440' href='#docfunc4440'>selenium::key_up</a></h4>
1928<i><a href='#tocfunc4440'>Index</a></i><br>
1929
1930<pre>Simulates a user releasing a key.
1931
1932'locator' is an element locator
1933'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;.
1934</pre>
1935<pre>(define (selenium::key_up sel-sess locator keySequence)
1936            (selenium::do-command sel-sess &quot;keyUp&quot; locator keySequence ))
1937
1938
1939</pre>
1940<h4><a name='codefunc1819' href='#docfunc1819'>selenium::mouse_over</a></h4>
1941<i><a href='#tocfunc1819'>Index</a></i><br>
1942
1943<pre>Simulates a user hovering a mouse over the specified element.
1944
1945'locator' is an element locator
1946</pre>
1947<pre>(define (selenium::mouse_over sel-sess locator)
1948            (selenium::do-command sel-sess &quot;mouseOver&quot; locator ))
1949
1950
1951</pre>
1952<h4><a name='codefunc37929' href='#docfunc37929'>selenium::mouse_out</a></h4>
1953<i><a href='#tocfunc37929'>Index</a></i><br>
1954
1955<pre>Simulates a user moving the mouse pointer away from the specified element.
1956
1957'locator' is an element locator
1958</pre>
1959<pre>(define (selenium::mouse_out sel-sess locator)
1960            (selenium::do-command sel-sess &quot;mouseOut&quot; locator ))
1961
1962
1963</pre>
1964<h4><a name='codefunc64545' href='#docfunc64545'>selenium::mouse_down</a></h4>
1965<i><a href='#tocfunc64545'>Index</a></i><br>
1966
1967<pre>Simulates a user pressing the mouse button (without releasing it yet) on
1968the specified element.
1969
1970'locator' is an element locator
1971</pre>
1972<pre>(define (selenium::mouse_down sel-sess locator)
1973            (selenium::do-command sel-sess &quot;mouseDown&quot; locator ))
1974
1975
1976</pre>
1977<h4><a name='codefunc24053' href='#docfunc24053'>selenium::mouse_down_at</a></h4>
1978<i><a href='#tocfunc24053'>Index</a></i><br>
1979
1980<pre>Simulates a user pressing the mouse button (without releasing it yet) at
1981the specified location.
1982
1983'locator' is an element locator
1984'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
1985</pre>
1986<pre>(define (selenium::mouse_down_at sel-sess locator coordString)
1987            (selenium::do-command sel-sess &quot;mouseDownAt&quot; locator coordString ))
1988
1989
1990</pre>
1991<h4><a name='codefunc36539' href='#docfunc36539'>selenium::mouse_up</a></h4>
1992<i><a href='#tocfunc36539'>Index</a></i><br>
1993
1994<pre>Simulates the event that occurs when the user releases the mouse button (i.e., stops
1995holding the button down) on the specified element.
1996
1997'locator' is an element locator
1998</pre>
1999<pre>(define (selenium::mouse_up sel-sess locator)
2000            (selenium::do-command sel-sess &quot;mouseUp&quot; locator ))
2001
2002
2003</pre>
2004<h4><a name='codefunc61582' href='#docfunc61582'>selenium::mouse_up_at</a></h4>
2005<i><a href='#tocfunc61582'>Index</a></i><br>
2006
2007<pre>Simulates the event that occurs when the user releases the mouse button (i.e., stops
2008holding the button down) at the specified location.
2009
2010'locator' is an element locator
2011'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
2012</pre>
2013<pre>(define (selenium::mouse_up_at sel-sess locator coordString)
2014            (selenium::do-command sel-sess &quot;mouseUpAt&quot; locator coordString ))
2015
2016
2017</pre>
2018<h4><a name='codefunc62249' href='#docfunc62249'>selenium::mouse_move</a></h4>
2019<i><a href='#tocfunc62249'>Index</a></i><br>
2020
2021<pre>Simulates a user pressing the mouse button (without releasing it yet) on
2022the specified element.
2023
2024'locator' is an element locator
2025</pre>
2026<pre>(define (selenium::mouse_move sel-sess locator)
2027            (selenium::do-command sel-sess &quot;mouseMove&quot; locator ))
2028
2029
2030</pre>
2031<h4><a name='codefunc21757' href='#docfunc21757'>selenium::mouse_move_at</a></h4>
2032<i><a href='#tocfunc21757'>Index</a></i><br>
2033
2034<pre>Simulates a user pressing the mouse button (without releasing it yet) on
2035the specified element.
2036
2037'locator' is an element locator
2038'coordString' is specifies the x,y position (i.e. - 10,20) of the mouse      event relative to the element returned by the locator.
2039</pre>
2040<pre>(define (selenium::mouse_move_at sel-sess locator coordString)
2041            (selenium::do-command sel-sess &quot;mouseMoveAt&quot; locator coordString ))
2042
2043
2044</pre>
2045<h4><a name='codefunc47842' href='#docfunc47842'>selenium::type</a></h4>
2046<i><a href='#tocfunc47842'>Index</a></i><br>
2047
2048<pre>Sets the value of an input field, as though you typed it in.
2049
2050Can also be used to set the value of combo boxes, check boxes, etc. In these cases,
2051value should be the value of the option selected, not the visible text.
2052
2053
2054'locator' is an element locator
2055'value' is the value to type
2056</pre>
2057<pre>(define (selenium::type sel-sess locator value)
2058            (selenium::do-command sel-sess &quot;type&quot; locator value ))
2059
2060
2061</pre>
2062<h4><a name='codefunc40986' href='#docfunc40986'>selenium::type_keys</a></h4>
2063<i><a href='#tocfunc40986'>Index</a></i><br>
2064
2065<pre>Simulates keystroke events on the specified element, as though you typed the value key-by-key.
2066
2067This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string;
2068this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.
2069Unlike the simple &quot;type&quot; command, which forces the specified value into the page directly, this command
2070may or may not have any visible effect, even in cases where typing keys would normally have a visible effect.
2071For example, if you use &quot;typeKeys&quot; on a form element, you may or may not see the results of what you typed in
2072the field.
2073In 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
2074send the keystroke events corresponding to what you just typed.
2075
2076
2077'locator' is an element locator
2078'value' is the value to type
2079</pre>
2080<pre>(define (selenium::type_keys sel-sess locator value)
2081            (selenium::do-command sel-sess &quot;typeKeys&quot; locator value ))
2082
2083
2084</pre>
2085<h4><a name='codefunc30498' href='#docfunc30498'>selenium::set_speed</a></h4>
2086<i><a href='#tocfunc30498'>Index</a></i><br>
2087
2088<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.,
2089the delay is 0 milliseconds.
2090
2091'value' is the number of milliseconds to pause after operation
2092</pre>
2093<pre>(define (selenium::set_speed sel-sess value)
2094            (selenium::do-command sel-sess &quot;setSpeed&quot; value ))
2095
2096
2097</pre>
2098<h4><a name='codefunc30486' href='#docfunc30486'>selenium::get_speed</a></h4>
2099<i><a href='#tocfunc30486'>Index</a></i><br>
2100
2101<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.,
2102the delay is 0 milliseconds.
2103
2104See also setSpeed.
2105
2106</pre>
2107<pre>(define (selenium::get_speed sel-sess )
2108            (selenium::do-command sel-sess &quot;getSpeed&quot; ))
2109
2110
2111</pre>
2112<h4><a name='codefunc43057' href='#docfunc43057'>selenium::check</a></h4>
2113<i><a href='#tocfunc43057'>Index</a></i><br>
2114
2115<pre>Check a toggle-button (checkbox/radio)
2116
2117'locator' is an element locator
2118</pre>
2119<pre>(define (selenium::check sel-sess locator)
2120            (selenium::do-command sel-sess &quot;check&quot; locator ))
2121
2122
2123</pre>
2124<h4><a name='codefunc5799' href='#docfunc5799'>selenium::uncheck</a></h4>
2125<i><a href='#tocfunc5799'>Index</a></i><br>
2126
2127<pre>Uncheck a toggle-button (checkbox/radio)
2128
2129'locator' is an element locator
2130</pre>
2131<pre>(define (selenium::uncheck sel-sess locator)
2132            (selenium::do-command sel-sess &quot;uncheck&quot; locator ))
2133
2134
2135</pre>
2136<h4><a name='codefunc6977' href='#docfunc6977'>selenium::select</a></h4>
2137<i><a href='#tocfunc6977'>Index</a></i><br>
2138
2139<pre>Select an option from a drop-down using an option locator.
2140
2141
2142Option locators provide different ways of specifying options of an HTML
2143Select element (e.g. for selecting a specific option, or for asserting
2144that the selected option satisfies a specification). There are several
2145forms of Select Option Locator.
2146
2147&lt;b&gt;label&lt;/b&gt;=&lt;em&gt;labelPattern&lt;/em&gt;:
2148matches options based on their labels, i.e. the visible text. (This
2149is the default.)
2150label=regexp:^[Oo]ther
2151&lt;b&gt;value&lt;/b&gt;=&lt;em&gt;valuePattern&lt;/em&gt;:
2152matches options based on their values.
2153value=other
2154&lt;b&gt;id&lt;/b&gt;=&lt;em&gt;id&lt;/em&gt;:
2155
2156matches options based on their ids.
2157id=option1
2158&lt;b&gt;index&lt;/b&gt;=&lt;em&gt;index&lt;/em&gt;:
2159matches an option based on its index (offset from zero).
2160index=2
2161
2162
2163If no option locator prefix is provided, the default behaviour is to match on &lt;b&gt;label&lt;/b&gt;.
2164
2165
2166
2167'selectLocator' is an element locator identifying a drop-down menu
2168'optionLocator' is an option locator (a label by default)
2169</pre>
2170<pre>(define (selenium::select sel-sess selectLocator optionLocator)
2171            (selenium::do-command sel-sess &quot;select&quot; selectLocator optionLocator ))
2172
2173
2174</pre>
2175<h4><a name='codefunc20190' href='#docfunc20190'>selenium::add_selection</a></h4>
2176<i><a href='#tocfunc20190'>Index</a></i><br>
2177
2178<pre>Add a selection to the set of selected options in a multi-select element using an option locator.
2179
2180@see #doSelect for details of option locators
2181
2182'locator' is an element locator identifying a multi-select box
2183'optionLocator' is an option locator (a label by default)
2184</pre>
2185<pre>(define (selenium::add_selection sel-sess locator optionLocator)
2186            (selenium::do-command sel-sess &quot;addSelection&quot; locator optionLocator ))
2187
2188
2189</pre>
2190<h4><a name='codefunc12642' href='#docfunc12642'>selenium::remove_selection</a></h4>
2191<i><a href='#tocfunc12642'>Index</a></i><br>
2192
2193<pre>Remove a selection from the set of selected options in a multi-select element using an option locator.
2194
2195@see #doSelect for details of option locators
2196
2197'locator' is an element locator identifying a multi-select box
2198'optionLocator' is an option locator (a label by default)
2199</pre>
2200<pre>(define (selenium::remove_selection sel-sess locator optionLocator)
2201            (selenium::do-command sel-sess &quot;removeSelection&quot; locator optionLocator ))
2202
2203
2204</pre>
2205<h4><a name='codefunc65440' href='#docfunc65440'>selenium::remove_all_selections</a></h4>
2206<i><a href='#tocfunc65440'>Index</a></i><br>
2207
2208<pre>Unselects all of the selected options in a multi-select element.
2209
2210'locator' is an element locator identifying a multi-select box
2211</pre>
2212<pre>(define (selenium::remove_all_selections sel-sess locator)
2213            (selenium::do-command sel-sess &quot;removeAllSelections&quot; locator ))
2214
2215
2216</pre>
2217<h4><a name='codefunc13117' href='#docfunc13117'>selenium::submit</a></h4>
2218<i><a href='#tocfunc13117'>Index</a></i><br>
2219
2220<pre>Submit the specified form. This is particularly useful for forms without
2221submit buttons, e.g. single-input &quot;Search&quot; forms.
2222
2223'formLocator' is an element locator for the form you want to submit
2224</pre>
2225<pre>(define (selenium::submit sel-sess formLocator)
2226            (selenium::do-command sel-sess &quot;submit&quot; formLocator ))
2227
2228
2229</pre>
2230<h4><a name='codefunc47826' href='#docfunc47826'>selenium::open</a></h4>
2231<i><a href='#tocfunc47826'>Index</a></i><br>
2232
2233<pre>Opens an URL in the test frame. This accepts both relative and absolute
2234URLs.
2235
2236The &quot;open&quot; command waits for the page to load before proceeding,
2237ie. the &quot;AndWait&quot; suffix is implicit.
2238
2239&lt;em&gt;Note&lt;/em&gt;: The URL must be on the same domain as the runner HTML
2240due to security restrictions in the browser (Same Origin Policy). If you
2241need to open an URL on another domain, use the Selenium Server to start a
2242new browser session on that domain.
2243
2244'url' is the URL to open; may be relative or absolute
2245</pre>
2246<pre>(define (selenium::open sel-sess url)
2247            (selenium::do-command sel-sess &quot;open&quot; url ))
2248
2249
2250</pre>
2251<h4><a name='codefunc4215' href='#docfunc4215'>selenium::open_window</a></h4>
2252<i><a href='#tocfunc4215'>Index</a></i><br>
2253
2254<pre>Opens a popup window (if a window with that ID isn't already open).
2255After opening the window, you'll need to select it using the selectWindow
2256command.
2257
2258This 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).
2259In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using
2260an empty (blank) url, like this: openWindow(&quot;&quot;, &quot;myFunnyWindow&quot;).
2261
2262
2263'url' is the URL to open, which can be blank
2264'windowID' is the JavaScript window ID of the window to select
2265</pre>
2266<pre>(define (selenium::open_window sel-sess url windowID)
2267            (selenium::do-command sel-sess &quot;openWindow&quot; url windowID ))
2268
2269
2270</pre>
2271<h4><a name='codefunc28901' href='#docfunc28901'>selenium::select_window</a></h4>
2272<i><a href='#tocfunc28901'>Index</a></i><br>
2273
2274<pre>Selects a popup window; once a popup window has been selected, all
2275commands go to that window. To select the main window again, use null
2276as the target.
2277
2278Note that there is a big difference between a window's internal JavaScript &quot;name&quot; property
2279and the &quot;title&quot; of a given window's document (which is normally what you actually see, as an end user,
2280in the title bar of the window).  The &quot;name&quot; is normally invisible to the end-user; it's the second
2281parameter &quot;windowName&quot; passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag)
2282(which selenium intercepts).
2283Selenium has several strategies for finding the window object referred to by the &quot;windowID&quot; parameter.
22841.) 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).
22852.) if the value of the &quot;windowID&quot; parameter is a JavaScript variable name in the current application window, then it is assumed
2286that this variable contains the return value from a call to the JavaScript window.open() method.
22873.) Otherwise, selenium looks in a hash it maintains that maps string names to window &quot;names&quot;.
22884.) 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;.
2289Since &quot;title&quot; is not necessarily unique, this may have unexpected behavior.
2290If you're having trouble figuring out what is the name of a window that you want to manipulate, look at the selenium log messages
2291which identify the names of windows created via window.open (and therefore intercepted by selenium).  You will see messages
2292like the following for each window as it is opened:
2293&lt;tt&gt;debug: window.open call intercepted; window ID (which you can use with selectWindow()) is &quot;myNewWindow&quot;&lt;/tt&gt;
2294In 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).
2295(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
2296an empty (blank) url, like this: openWindow(&quot;&quot;, &quot;myFunnyWindow&quot;).
2297
2298
2299'windowID' is the JavaScript window ID of the window to select
2300</pre>
2301<pre>(define (selenium::select_window sel-sess windowID)
2302            (selenium::do-command sel-sess &quot;selectWindow&quot; windowID ))
2303
2304
2305</pre>
2306<h4><a name='codefunc18560' href='#docfunc18560'>selenium::select_frame</a></h4>
2307<i><a href='#tocfunc18560'>Index</a></i><br>
2308
2309<pre>Selects a frame within the current window.  (You may invoke this command
2310multiple times to select nested frames.)  To select the parent frame, use
2311&quot;relative=parent&quot; as a locator; to select the top frame, use &quot;relative=top&quot;.
2312You can also select a frame by its 0-based index number; select the first frame with
2313&quot;index=0&quot;, or the third frame with &quot;index=2&quot;.
2314
2315You may also use a DOM expression to identify the frame you want directly,
2316like this: &lt;tt&gt;dom=frames[&quot;main&quot;].frames[&quot;subframe&quot;]&lt;/tt&gt;
2317
2318
2319'locator' is an element locator identifying a frame or iframe
2320</pre>
2321<pre>(define (selenium::select_frame sel-sess locator)
2322            (selenium::do-command sel-sess &quot;selectFrame&quot; locator ))
2323
2324
2325</pre>
2326<h4><a name='codefunc57766' href='#docfunc57766'>selenium::get_whether_this_frame_match_frame_expression</a></h4>
2327<i><a href='#tocfunc57766'>Index</a></i><br>
2328
2329<pre>Determine whether current/locator identify the frame containing this running code.
2330
2331This is useful in proxy injection mode, where this code runs in every
2332browser frame and window, and sometimes the selenium server needs to identify
2333the &quot;current&quot; frame.  In this case, when the test calls selectFrame, this
2334routine is called for each frame to figure out which one has been selected.
2335The selected frame will return true, while all others will return false.
2336
2337
2338'currentFrameString' is starting frame
2339'target' is new frame (which might be relative to the current one)
2340</pre>
2341<pre>(define (selenium::get_whether_this_frame_match_frame_expression sel-sess currentFrameString target)
2342            (selenium::get-boolean sel-sess &quot;getWhetherThisFrameMatchFrameExpression&quot; currentFrameString target ))
2343
2344
2345</pre>
2346<h4><a name='codefunc23368' href='#docfunc23368'>selenium::get_whether_this_window_match_window_expression</a></h4>
2347<i><a href='#tocfunc23368'>Index</a></i><br>
2348
2349<pre>Determine whether currentWindowString plus target identify the window containing this running code.
2350
2351This is useful in proxy injection mode, where this code runs in every
2352browser frame and window, and sometimes the selenium server needs to identify
2353the &quot;current&quot; window.  In this case, when the test calls selectWindow, this
2354routine is called for each window to figure out which one has been selected.
2355The selected window will return true, while all others will return false.
2356
2357
2358'currentWindowString' is starting window
2359'target' is new window (which might be relative to the current one, e.g., &quot;_parent&quot;)
2360</pre>
2361<pre>(define (selenium::get_whether_this_window_match_window_expression sel-sess currentWindowString target)
2362            (selenium::get-boolean sel-sess &quot;getWhetherThisWindowMatchWindowExpression&quot; currentWindowString target ))
2363
2364
2365</pre>
2366<h4><a name='codefunc57675' href='#docfunc57675'>selenium::wait_for_pop_up</a></h4>
2367<i><a href='#tocfunc57675'>Index</a></i><br>
2368
2369<pre>Waits for a popup window to appear and load up.
2370
2371'windowID' is the JavaScript window ID of the window that will appear
2372'timeout' is a timeout in milliseconds, after which the action will return with an error
2373</pre>
2374<pre>(define (selenium::wait_for_pop_up sel-sess windowID timeout)
2375            (selenium::do-command sel-sess &quot;waitForPopUp&quot; windowID timeout ))
2376
2377
2378</pre>
2379<h4><a name='codefunc58889' href='#docfunc58889'>selenium::choose_cancel_on_next_confirmation</a></h4>
2380<i><a href='#tocfunc58889'>Index</a></i><br>
2381
2382<pre>By default, Selenium's overridden window.confirm() function will
2383return true, as if the user had manually clicked OK; after running
2384this command, the next call to confirm() will return false, as if
2385the user had clicked Cancel.  Selenium will then resume using the
2386default behavior for future confirmations, automatically returning
2387true (OK) unless/until you explicitly call this command for each
2388confirmation.
2389
2390</pre>
2391<pre>(define (selenium::choose_cancel_on_next_confirmation sel-sess )
2392            (selenium::do-command sel-sess &quot;chooseCancelOnNextConfirmation&quot; ))
2393
2394
2395</pre>
2396<h4><a name='codefunc7748' href='#docfunc7748'>selenium::choose_ok_on_next_confirmation</a></h4>
2397<i><a href='#tocfunc7748'>Index</a></i><br>
2398
2399<pre>Undo the effect of calling chooseCancelOnNextConfirmation.  Note
2400that Selenium's overridden window.confirm() function will normally automatically
2401return true, as if the user had manually clicked OK, so you shouldn't
2402need to use this command unless for some reason you need to change
2403your mind prior to the next confirmation.  After any confirmation, Selenium will resume using the
2404default behavior for future confirmations, automatically returning
2405true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each
2406confirmation.
2407
2408</pre>
2409<pre>(define (selenium::choose_ok_on_next_confirmation sel-sess )
2410            (selenium::do-command sel-sess &quot;chooseOkOnNextConfirmation&quot; ))
2411
2412
2413</pre>
2414<h4><a name='codefunc11680' href='#docfunc11680'>selenium::answer_on_next_prompt</a></h4>
2415<i><a href='#tocfunc11680'>Index</a></i><br>
2416
2417<pre>Instructs Selenium to return the specified answer string in response to
2418the next JavaScript prompt [window.prompt()].
2419
2420'answer' is the answer to give in response to the prompt pop-up
2421</pre>
2422<pre>(define (selenium::answer_on_next_prompt sel-sess answer)
2423            (selenium::do-command sel-sess &quot;answerOnNextPrompt&quot; answer ))
2424
2425
2426</pre>
2427<h4><a name='codefunc4497' href='#docfunc4497'>selenium::go_back</a></h4>
2428<i><a href='#tocfunc4497'>Index</a></i><br>
2429
2430<pre>Simulates the user clicking the &quot;back&quot; button on their browser.
2431
2432</pre>
2433<pre>(define (selenium::go_back sel-sess )
2434            (selenium::do-command sel-sess &quot;goBack&quot; ))
2435
2436
2437</pre>
2438<h4><a name='codefunc10148' href='#docfunc10148'>selenium::refresh</a></h4>
2439<i><a href='#tocfunc10148'>Index</a></i><br>
2440
2441<pre>Simulates the user clicking the &quot;Refresh&quot; button on their browser.
2442
2443</pre>
2444<pre>(define (selenium::refresh sel-sess )
2445            (selenium::do-command sel-sess &quot;refresh&quot; ))
2446
2447
2448</pre>
2449<h4><a name='codefunc48181' href='#docfunc48181'>selenium::close</a></h4>
2450<i><a href='#tocfunc48181'>Index</a></i><br>
2451
2452<pre>Simulates the user clicking the &quot;close&quot; button in the titlebar of a popup
2453window or tab.
2454
2455</pre>
2456<pre>(define (selenium::close sel-sess )
2457            (selenium::do-command sel-sess &quot;close&quot; ))
2458
2459
2460</pre>
2461<h4><a name='codefunc14937' href='#docfunc14937'>selenium::is_alert_present</a></h4>
2462<i><a href='#tocfunc14937'>Index</a></i><br>
2463
2464<pre>Has an alert occurred?
2465
2466
2467This function never throws an exception
2468
2469
2470
2471</pre>
2472<pre>(define (selenium::is_alert_present sel-sess )
2473            (selenium::get-boolean sel-sess &quot;isAlertPresent&quot; ))
2474
2475
2476</pre>
2477<h4><a name='codefunc21450' href='#docfunc21450'>selenium::is_prompt_present</a></h4>
2478<i><a href='#tocfunc21450'>Index</a></i><br>
2479
2480<pre>Has a prompt occurred?
2481
2482
2483This function never throws an exception
2484
2485
2486
2487</pre>
2488<pre>(define (selenium::is_prompt_present sel-sess )
2489            (selenium::get-boolean sel-sess &quot;isPromptPresent&quot; ))
2490
2491
2492</pre>
2493<h4><a name='codefunc36855' href='#docfunc36855'>selenium::is_confirmation_present</a></h4>
2494<i><a href='#tocfunc36855'>Index</a></i><br>
2495
2496<pre>Has confirm() been called?
2497
2498
2499This function never throws an exception
2500
2501
2502
2503</pre>
2504<pre>(define (selenium::is_confirmation_present sel-sess )
2505            (selenium::get-boolean sel-sess &quot;isConfirmationPresent&quot; ))
2506
2507
2508</pre>
2509<h4><a name='codefunc32788' href='#docfunc32788'>selenium::get_alert</a></h4>
2510<i><a href='#tocfunc32788'>Index</a></i><br>
2511
2512<pre>Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.
2513
2514Getting an alert has the same effect as manually clicking OK. If an
2515alert is generated but you do not get/verify it, the next Selenium action
2516will fail.
2517NOTE: under Selenium, JavaScript alerts will NOT pop up a visible alert
2518dialog.
2519NOTE: Selenium does NOT support JavaScript alerts that are generated in a
2520page's onload() event handler. In this case a visible dialog WILL be
2521generated and Selenium will hang until someone manually clicks OK.
2522
2523
2524</pre>
2525<pre>(define (selenium::get_alert sel-sess )
2526            (selenium::get-string sel-sess &quot;getAlert&quot; ))
2527
2528
2529</pre>
2530<h4><a name='codefunc8806' href='#docfunc8806'>selenium::get_confirmation</a></h4>
2531<i><a href='#tocfunc8806'>Index</a></i><br>
2532
2533<pre>Retrieves the message of a JavaScript confirmation dialog generated during
2534the previous action.
2535
2536
2537By default, the confirm function will return true, having the same effect
2538as manually clicking OK. This can be changed by prior execution of the
2539chooseCancelOnNextConfirmation command. If an confirmation is generated
2540but you do not get/verify it, the next Selenium action will fail.
2541
2542
2543NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible
2544dialog.
2545
2546
2547NOTE: Selenium does NOT support JavaScript confirmations that are
2548generated in a page's onload() event handler. In this case a visible
2549dialog WILL be generated and Selenium will hang until you manually click
2550OK.
2551
2552
2553
2554</pre>
2555<pre>(define (selenium::get_confirmation sel-sess )
2556            (selenium::get-string sel-sess &quot;getConfirmation&quot; ))
2557
2558
2559</pre>
2560<h4><a name='codefunc62761' href='#docfunc62761'>selenium::get_prompt</a></h4>
2561<i><a href='#tocfunc62761'>Index</a></i><br>
2562
2563<pre>Retrieves the message of a JavaScript question prompt dialog generated during
2564the previous action.
2565
2566Successful handling of the prompt requires prior execution of the
2567answerOnNextPrompt command. If a prompt is generated but you
2568do not get/verify it, the next Selenium action will fail.
2569NOTE: under Selenium, JavaScript prompts will NOT pop up a visible
2570dialog.
2571NOTE: Selenium does NOT support JavaScript prompts that are generated in a
2572page's onload() event handler. In this case a visible dialog WILL be
2573generated and Selenium will hang until someone manually clicks OK.
2574
2575
2576</pre>
2577<pre>(define (selenium::get_prompt sel-sess )
2578            (selenium::get-string sel-sess &quot;getPrompt&quot; ))
2579
2580
2581</pre>
2582<h4><a name='codefunc18829' href='#docfunc18829'>selenium::get_location</a></h4>
2583<i><a href='#tocfunc18829'>Index</a></i><br>
2584
2585<pre>Gets the absolute URL of the current page.
2586
2587</pre>
2588<pre>(define (selenium::get_location sel-sess )
2589            (selenium::get-string sel-sess &quot;getLocation&quot; ))
2590
2591
2592</pre>
2593<h4><a name='codefunc30503' href='#docfunc30503'>selenium::get_title</a></h4>
2594<i><a href='#tocfunc30503'>Index</a></i><br>
2595
2596<pre>Gets the title of the current page.
2597
2598</pre>
2599<pre>(define (selenium::get_title sel-sess )
2600            (selenium::get-string sel-sess &quot;getTitle&quot; ))
2601
2602
2603</pre>
2604<h4><a name='codefunc30425' href='#docfunc30425'>selenium::get_body_text</a></h4>
2605<i><a href='#tocfunc30425'>Index</a></i><br>
2606
2607<pre>Gets the entire text of the page.
2608
2609</pre>
2610<pre>(define (selenium::get_body_text sel-sess )
2611            (selenium::get-string sel-sess &quot;getBodyText&quot; ))
2612
2613
2614</pre>
2615<h4><a name='codefunc30753' href='#docfunc30753'>selenium::get_value</a></h4>
2616<i><a href='#tocfunc30753'>Index</a></i><br>
2617
2618<pre>Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter).
2619For checkbox/radio elements, the value will be &quot;on&quot; or &quot;off&quot; depending on
2620whether the element is checked or not.
2621
2622'locator' is an element locator
2623</pre>
2624<pre>(define (selenium::get_value sel-sess locator)
2625            (selenium::get-string sel-sess &quot;getValue&quot; locator ))
2626
2627
2628</pre>
2629<h4><a name='codefunc31430' href='#docfunc31430'>selenium::get_text</a></h4>
2630<i><a href='#tocfunc31430'>Index</a></i><br>
2631
2632<pre>Gets the text of an element. This works for any element that contains
2633text. This command uses either the textContent (Mozilla-like browsers) or
2634the innerText (IE-like browsers) of the element, which is the rendered
2635text shown to the user.
2636
2637'locator' is an element locator
2638</pre>
2639<pre>(define (selenium::get_text sel-sess locator)
2640            (selenium::get-string sel-sess &quot;getText&quot; locator ))
2641
2642
2643</pre>
2644<h4><a name='codefunc32789' href='#docfunc32789'>selenium::highlight</a></h4>
2645<i><a href='#tocfunc32789'>Index</a></i><br>
2646
2647<pre>Briefly changes the backgroundColor of the specified element yellow.  Useful for debugging.
2648
2649'locator' is an element locator
2650</pre>
2651<pre>(define (selenium::highlight sel-sess locator)
2652            (selenium::do-command sel-sess &quot;highlight&quot; locator ))
2653
2654
2655</pre>
2656<h4><a name='codefunc33696' href='#docfunc33696'>selenium::get_eval</a></h4>
2657<i><a href='#tocfunc33696'>Index</a></i><br>
2658
2659<pre>Gets the result of evaluating the specified JavaScript snippet.  The snippet may
2660have multiple lines, but only the result of the last line will be returned.
2661
2662Note that, by default, the snippet will run in the context of the &quot;selenium&quot;
2663object itself, so &lt;tt&gt;this&lt;/tt&gt; will refer to the Selenium object.  Use &lt;tt&gt;window&lt;/tt&gt; to
2664refer to the window of your application, e.g. &lt;tt&gt;window.document.getElementById('foo')&lt;/tt&gt;
2665If you need to use
2666a locator to refer to a single element in your application page, you can
2667use &lt;tt&gt;this.browserbot.findElement(&quot;id=foo&quot;)&lt;/tt&gt; where &quot;id=foo&quot; is your locator.
2668
2669
2670'script' is the JavaScript snippet to run
2671</pre>
2672<pre>(define (selenium::get_eval sel-sess script)
2673            (selenium::get-string sel-sess &quot;getEval&quot; script ))
2674
2675
2676</pre>
2677<h4><a name='codefunc59383' href='#docfunc59383'>selenium::is_checked</a></h4>
2678<i><a href='#tocfunc59383'>Index</a></i><br>
2679
2680<pre>Gets whether a toggle-button (checkbox/radio) is checked.  Fails if the specified element doesn't exist or isn't a toggle-button.
2681
2682'locator' is an element locator pointing to a checkbox or radio button
2683</pre>
2684<pre>(define (selenium::is_checked sel-sess locator)
2685            (selenium::get-boolean sel-sess &quot;isChecked&quot; locator ))
2686
2687
2688</pre>
2689<h4><a name='codefunc28437' href='#docfunc28437'>selenium::get_table</a></h4>
2690<i><a href='#tocfunc28437'>Index</a></i><br>
2691
2692<pre>Gets the text from a cell of a table. The cellAddress syntax
2693tableLocator.row.column, where row and column start at 0.
2694
2695'tableCellAddress' is a cell address, e.g. &quot;foo.1.4&quot;
2696</pre>
2697<pre>(define (selenium::get_table sel-sess tableCellAddress)
2698            (selenium::get-string sel-sess &quot;getTable&quot; tableCellAddress ))
2699
2700
2701</pre>
2702<h4><a name='codefunc32795' href='#docfunc32795'>selenium::get_selected_labels</a></h4>
2703<i><a href='#tocfunc32795'>Index</a></i><br>
2704
2705<pre>Gets all option labels (visible text) for selected options in the specified select or multi-select element.
2706
2707'selectLocator' is an element locator identifying a drop-down menu
2708</pre>
2709<pre>(define (selenium::get_selected_labels sel-sess selectLocator)
2710            (selenium::get-string-array sel-sess &quot;getSelectedLabels&quot; selectLocator ))
2711
2712
2713</pre>
2714<h4><a name='codefunc32680' href='#docfunc32680'>selenium::get_selected_label</a></h4>
2715<i><a href='#tocfunc32680'>Index</a></i><br>
2716
2717<pre>Gets option label (visible text) for selected option in the specified select element.
2718
2719'selectLocator' is an element locator identifying a drop-down menu
2720</pre>
2721<pre>(define (selenium::get_selected_label sel-sess selectLocator)
2722            (selenium::get-string sel-sess &quot;getSelectedLabel&quot; selectLocator ))
2723
2724
2725</pre>
2726<h4><a name='codefunc36139' href='#docfunc36139'>selenium::get_selected_values</a></h4>
2727<i><a href='#tocfunc36139'>Index</a></i><br>
2728
2729<pre>Gets all option values (value attributes) for selected options in the specified select or multi-select element.
2730
2731'selectLocator' is an element locator identifying a drop-down menu
2732</pre>
2733<pre>(define (selenium::get_selected_values sel-sess selectLocator)
2734            (selenium::get-string-array sel-sess &quot;getSelectedValues&quot; selectLocator ))
2735
2736
2737</pre>
2738<h4><a name='codefunc36024' href='#docfunc36024'>selenium::get_selected_value</a></h4>
2739<i><a href='#tocfunc36024'>Index</a></i><br>
2740
2741<pre>Gets option value (value attribute) for selected option in the specified select element.
2742
2743'selectLocator' is an element locator identifying a drop-down menu
2744</pre>
2745<pre>(define (selenium::get_selected_value sel-sess selectLocator)
2746            (selenium::get-string sel-sess &quot;getSelectedValue&quot; selectLocator ))
2747
2748
2749</pre>
2750<h4><a name='codefunc65050' href='#docfunc65050'>selenium::get_selected_indexes</a></h4>
2751<i><a href='#tocfunc65050'>Index</a></i><br>
2752
2753<pre>Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element.
2754
2755'selectLocator' is an element locator identifying a drop-down menu
2756</pre>
2757<pre>(define (selenium::get_selected_indexes sel-sess selectLocator)
2758            (selenium::get-string-array sel-sess &quot;getSelectedIndexes&quot; selectLocator ))
2759
2760
2761</pre>
2762<h4><a name='codefunc35509' href='#docfunc35509'>selenium::get_selected_index</a></h4>
2763<i><a href='#tocfunc35509'>Index</a></i><br>
2764
2765<pre>Gets option index (option number, starting at 0) for selected option in the specified select element.
2766
2767'selectLocator' is an element locator identifying a drop-down menu
2768</pre>
2769<pre>(define (selenium::get_selected_index sel-sess selectLocator)
2770            (selenium::get-string sel-sess &quot;getSelectedIndex&quot; selectLocator ))
2771
2772
2773</pre>
2774<h4><a name='codefunc8518' href='#docfunc8518'>selenium::get_selected_ids</a></h4>
2775<i><a href='#tocfunc8518'>Index</a></i><br>
2776
2777<pre>Gets all option element IDs for selected options in the specified select or multi-select element.
2778
2779'selectLocator' is an element locator identifying a drop-down menu
2780</pre>
2781<pre>(define (selenium::get_selected_ids sel-sess selectLocator)
2782            (selenium::get-string-array sel-sess &quot;getSelectedIds&quot; selectLocator ))
2783
2784
2785</pre>
2786<h4><a name='codefunc44613' href='#docfunc44613'>selenium::get_selected_id</a></h4>
2787<i><a href='#tocfunc44613'>Index</a></i><br>
2788
2789<pre>Gets option element ID for selected option in the specified select element.
2790
2791'selectLocator' is an element locator identifying a drop-down menu
2792</pre>
2793<pre>(define (selenium::get_selected_id sel-sess selectLocator)
2794            (selenium::get-string sel-sess &quot;getSelectedId&quot; selectLocator ))
2795
2796
2797</pre>
2798<h4><a name='codefunc7797' href='#docfunc7797'>selenium::is_something_selected</a></h4>
2799<i><a href='#tocfunc7797'>Index</a></i><br>
2800
2801<pre>Determines whether some option in a drop-down menu is selected.
2802
2803'selectLocator' is an element locator identifying a drop-down menu
2804</pre>
2805<pre>(define (selenium::is_something_selected sel-sess selectLocator)
2806            (selenium::get-boolean sel-sess &quot;isSomethingSelected&quot; selectLocator ))
2807
2808
2809</pre>
2810<h4><a name='codefunc42692' href='#docfunc42692'>selenium::get_select_options</a></h4>
2811<i><a href='#tocfunc42692'>Index</a></i><br>
2812
2813<pre>Gets all option labels in the specified select drop-down.
2814
2815'selectLocator' is an element locator identifying a drop-down menu
2816</pre>
2817<pre>(define (selenium::get_select_options sel-sess selectLocator)
2818            (selenium::get-string-array sel-sess &quot;getSelectOptions&quot; selectLocator ))
2819
2820
2821</pre>
2822<h4><a name='codefunc24307' href='#docfunc24307'>selenium::get_attribute</a></h4>
2823<i><a href='#tocfunc24307'>Index</a></i><br>
2824
2825<pre>Gets the value of an element attribute.
2826
2827'attributeLocator' is an element locator followed by an @ sign and then the name of the attribute, e.g. &quot;foo@bar&quot;
2828</pre>
2829<pre>(define (selenium::get_attribute sel-sess attributeLocator)
2830            (selenium::get-string sel-sess &quot;getAttribute&quot; attributeLocator ))
2831
2832
2833</pre>
2834<h4><a name='codefunc61519' href='#docfunc61519'>selenium::is_text_present</a></h4>
2835<i><a href='#tocfunc61519'>Index</a></i><br>
2836
2837<pre>Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.
2838
2839'pattern' is a pattern to match with the text of the page
2840</pre>
2841<pre>(define (selenium::is_text_present sel-sess pattern)
2842            (selenium::get-boolean sel-sess &quot;isTextPresent&quot; pattern ))
2843
2844
2845</pre>
2846<h4><a name='codefunc41922' href='#docfunc41922'>selenium::is_element_present</a></h4>
2847<i><a href='#tocfunc41922'>Index</a></i><br>
2848
2849<pre>Verifies that the specified element is somewhere on the page.
2850
2851'locator' is an element locator
2852</pre>
2853<pre>(define (selenium::is_element_present sel-sess locator)
2854            (selenium::get-boolean sel-sess &quot;isElementPresent&quot; locator ))
2855
2856
2857</pre>
2858<h4><a name='codefunc262' href='#docfunc262'>selenium::is_visible</a></h4>
2859<i><a href='#tocfunc262'>Index</a></i><br>
2860
2861<pre>Determines if the specified element is visible. An
2862element can be rendered invisible by setting the CSS &quot;visibility&quot;
2863property to &quot;hidden&quot;, or the &quot;display&quot; property to &quot;none&quot;, either for the
2864element itself or one if its ancestors.  This method will fail if
2865the element is not present.
2866
2867'locator' is an element locator
2868</pre>
2869<pre>(define (selenium::is_visible sel-sess locator)
2870            (selenium::get-boolean sel-sess &quot;isVisible&quot; locator ))
2871
2872
2873</pre>
2874<h4><a name='codefunc60518' href='#docfunc60518'>selenium::is_editable</a></h4>
2875<i><a href='#tocfunc60518'>Index</a></i><br>
2876
2877<pre>Determines whether the specified input element is editable, ie hasn't been disabled.
2878This method will fail if the specified element isn't an input element.
2879
2880'locator' is an element locator
2881</pre>
2882<pre>(define (selenium::is_editable sel-sess locator)
2883            (selenium::get-boolean sel-sess &quot;isEditable&quot; locator ))
2884
2885
2886</pre>
2887<h4><a name='codefunc50528' href='#docfunc50528'>selenium::get_all_buttons</a></h4>
2888<i><a href='#tocfunc50528'>Index</a></i><br>
2889
2890<pre>Returns the IDs of all buttons on the page.
2891
2892If a given button has no ID, it will appear as &quot;&quot; in this array.
2893
2894
2895</pre>
2896<pre>(define (selenium::get_all_buttons sel-sess )
2897            (selenium::get-string-array sel-sess &quot;getAllButtons&quot; ))
2898
2899
2900</pre>
2901<h4><a name='codefunc16885' href='#docfunc16885'>selenium::get_all_links</a></h4>
2902<i><a href='#tocfunc16885'>Index</a></i><br>
2903
2904<pre>Returns the IDs of all links on the page.
2905
2906If a given link has no ID, it will appear as &quot;&quot; in this array.
2907
2908
2909</pre>
2910<pre>(define (selenium::get_all_links sel-sess )
2911            (selenium::get-string-array sel-sess &quot;getAllLinks&quot; ))
2912
2913
2914</pre>
2915<h4><a name='codefunc46551' href='#docfunc46551'>selenium::get_all_fields</a></h4>
2916<i><a href='#tocfunc46551'>Index</a></i><br>
2917
2918<pre>Returns the IDs of all input fields on the page.
2919
2920If a given field has no ID, it will appear as &quot;&quot; in this array.
2921
2922
2923</pre>
2924<pre>(define (selenium::get_all_fields sel-sess )
2925            (selenium::get-string-array sel-sess &quot;getAllFields&quot; ))
2926
2927
2928</pre>
2929<h4><a name='codefunc13370' href='#docfunc13370'>selenium::get_attribute_from_all_windows</a></h4>
2930<i><a href='#tocfunc13370'>Index</a></i><br>
2931
2932<pre>Returns every instance of some attribute from all known windows.
2933
2934'attributeName' is name of an attribute on the windows
2935</pre>
2936<pre>(define (selenium::get_attribute_from_all_windows sel-sess attributeName)
2937            (selenium::get-string-array sel-sess &quot;getAttributeFromAllWindows&quot; attributeName ))
2938
2939
2940</pre>
2941<h4><a name='codefunc39063' href='#docfunc39063'>selenium::dragdrop</a></h4>
2942<i><a href='#tocfunc39063'>Index</a></i><br>
2943
2944<pre>deprecated - use dragAndDrop instead
2945
2946'locator' is an element locator
2947'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., &quot;+70,-300&quot;
2948</pre>
2949<pre>(define (selenium::dragdrop sel-sess locator movementsString)
2950            (selenium::do-command sel-sess &quot;dragdrop&quot; locator movementsString ))
2951
2952
2953</pre>
2954<h4><a name='codefunc47466' href='#docfunc47466'>selenium::set_mouse_speed</a></h4>
2955<i><a href='#tocfunc47466'>Index</a></i><br>
2956
2957<pre>Configure the number of pixels between &quot;mousemove&quot; events during dragAndDrop commands (default=10).
2958Setting this value to 0 means that we'll send a &quot;mousemove&quot; event to every single pixel
2959in between the start location and the end location; that can be very slow, and may
2960cause some browsers to force the JavaScript to timeout.
2961If the mouse speed is greater than the distance between the two dragged objects, we'll
2962just send one &quot;mousemove&quot; at the start location and then one final one at the end location.
2963
2964
2965'pixels' is the number of pixels between &quot;mousemove&quot; events
2966</pre>
2967<pre>(define (selenium::set_mouse_speed sel-sess pixels)
2968            (selenium::do-command sel-sess &quot;setMouseSpeed&quot; pixels ))
2969
2970
2971</pre>
2972<h4><a name='codefunc47454' href='#docfunc47454'>selenium::get_mouse_speed</a></h4>
2973<i><a href='#tocfunc47454'>Index</a></i><br>
2974
2975<pre>Returns the number of pixels between &quot;mousemove&quot; events during dragAndDrop commands (default=10).
2976
2977</pre>
2978<pre>(define (selenium::get_mouse_speed sel-sess )
2979            (selenium::get-number sel-sess &quot;getMouseSpeed&quot; ))
2980
2981
2982</pre>
2983<h4><a name='codefunc20435' href='#docfunc20435'>selenium::drag_and_drop</a></h4>
2984<i><a href='#tocfunc20435'>Index</a></i><br>
2985
2986<pre>Drags an element a certain distance and then drops it
2987
2988'locator' is an element locator
2989'movementsString' is offset in pixels from the current location to which the element should be moved, e.g., &quot;+70,-300&quot;
2990</pre>
2991<pre>(define (selenium::drag_and_drop sel-sess locator movementsString)
2992            (selenium::do-command sel-sess &quot;dragAndDrop&quot; locator movementsString ))
2993
2994
2995</pre>
2996<h4><a name='codefunc23523' href='#docfunc23523'>selenium::drag_and_drop_to_object</a></h4>
2997<i><a href='#tocfunc23523'>Index</a></i><br>
2998
2999<pre>Drags an element and drops it on another element
3000
3001'locatorOfObjectToBeDragged' is an element to be dragged
3002'locatorOfDragDestinationObject' is an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged  is dropped
3003</pre>
3004<pre>(define (selenium::drag_and_drop_to_object sel-sess locatorOfObjectToBeDragged locatorOfDragDestinationObject)
3005            (selenium::do-command sel-sess &quot;dragAndDropToObject&quot; locatorOfObjectToBeDragged locatorOfDragDestinationObject ))
3006
3007
3008</pre>
3009<h4><a name='codefunc24215' href='#docfunc24215'>selenium::window_focus</a></h4>
3010<i><a href='#tocfunc24215'>Index</a></i><br>
3011
3012<pre>Gives focus to the currently selected window
3013
3014</pre>
3015<pre>(define (selenium::window_focus sel-sess )
3016            (selenium::do-command sel-sess &quot;windowFocus&quot; ))
3017
3018
3019</pre>
3020<h4><a name='codefunc61259' href='#docfunc61259'>selenium::window_maximize</a></h4>
3021<i><a href='#tocfunc61259'>Index</a></i><br>
3022
3023<pre>Resize currently selected window to take up the entire screen
3024
3025</pre>
3026<pre>(define (selenium::window_maximize sel-sess )
3027            (selenium::do-command sel-sess &quot;windowMaximize&quot; ))
3028
3029
3030</pre>
3031<h4><a name='codefunc36544' href='#docfunc36544'>selenium::get_all_window_ids</a></h4>
3032<i><a href='#tocfunc36544'>Index</a></i><br>
3033
3034<pre>Returns the IDs of all windows that the browser knows about.
3035
3036</pre>
3037<pre>(define (selenium::get_all_window_ids sel-sess )
3038            (selenium::get-string-array sel-sess &quot;getAllWindowIds&quot; ))
3039
3040
3041</pre>
3042<h4><a name='codefunc291' href='#docfunc291'>selenium::get_all_window_names</a></h4>
3043<i><a href='#tocfunc291'>Index</a></i><br>
3044
3045<pre>Returns the names of all windows that the browser knows about.
3046
3047</pre>
3048<pre>(define (selenium::get_all_window_names sel-sess )
3049            (selenium::get-string-array sel-sess &quot;getAllWindowNames&quot; ))
3050
3051
3052</pre>
3053<h4><a name='codefunc165' href='#docfunc165'>selenium::get_all_window_titles</a></h4>
3054<i><a href='#tocfunc165'>Index</a></i><br>
3055
3056<pre>Returns the titles of all windows that the browser knows about.
3057
3058</pre>
3059<pre>(define (selenium::get_all_window_titles sel-sess )
3060            (selenium::get-string-array sel-sess &quot;getAllWindowTitles&quot; ))
3061
3062
3063</pre>
3064<h4><a name='codefunc52821' href='#docfunc52821'>selenium::get_html_source</a></h4>
3065<i><a href='#tocfunc52821'>Index</a></i><br>
3066
3067<pre>Returns the entire HTML source between the opening and
3068closing &quot;html&quot; tags.
3069
3070</pre>
3071<pre>(define (selenium::get_html_source sel-sess )
3072            (selenium::get-string sel-sess &quot;getHtmlSource&quot; ))
3073
3074
3075</pre>
3076<h4><a name='codefunc50234' href='#docfunc50234'>selenium::set_cursor_position</a></h4>
3077<i><a href='#tocfunc50234'>Index</a></i><br>
3078
3079<pre>Moves the text cursor to the specified position in the given input element or textarea.
3080This method will fail if the specified element isn't an input element or textarea.
3081
3082'locator' is an element locator pointing to an input element or textarea
3083'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.
3084</pre>
3085<pre>(define (selenium::set_cursor_position sel-sess locator position)
3086            (selenium::do-command sel-sess &quot;setCursorPosition&quot; locator position ))
3087
3088
3089</pre>
3090<h4><a name='codefunc7364' href='#docfunc7364'>selenium::get_element_index</a></h4>
3091<i><a href='#tocfunc7364'>Index</a></i><br>
3092
3093<pre>Get the relative index of an element to its parent (starting from 0). The comment node and empty text node
3094will be ignored.
3095
3096'locator' is an element locator pointing to an element
3097</pre>
3098<pre>(define (selenium::get_element_index sel-sess locator)
3099            (selenium::get-number sel-sess &quot;getElementIndex&quot; locator ))
3100
3101
3102</pre>
3103<h4><a name='codefunc64003' href='#docfunc64003'>selenium::is_ordered</a></h4>
3104<i><a href='#tocfunc64003'>Index</a></i><br>
3105
3106<pre>Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will
3107not be considered ordered.
3108
3109'locator1' is an element locator pointing to the first element
3110'locator2' is an element locator pointing to the second element
3111</pre>
3112<pre>(define (selenium::is_ordered sel-sess locator1 locator2)
3113            (selenium::get-boolean sel-sess &quot;isOrdered&quot; locator1 locator2 ))
3114
3115
3116</pre>
3117<h4><a name='codefunc52350' href='#docfunc52350'>selenium::get_element_position_left</a></h4>
3118<i><a href='#tocfunc52350'>Index</a></i><br>
3119
3120<pre>Retrieves the horizontal position of an element
3121
3122'locator' is an element locator pointing to an element OR an element itself
3123</pre>
3124<pre>(define (selenium::get_element_position_left sel-sess locator)
3125            (selenium::get-number sel-sess &quot;getElementPositionLeft&quot; locator ))
3126
3127
3128</pre>
3129<h4><a name='codefunc56852' href='#docfunc56852'>selenium::get_element_position_top</a></h4>
3130<i><a href='#tocfunc56852'>Index</a></i><br>
3131
3132<pre>Retrieves the vertical position of an element
3133
3134'locator' is an element locator pointing to an element OR an element itself
3135</pre>
3136<pre>(define (selenium::get_element_position_top sel-sess locator)
3137            (selenium::get-number sel-sess &quot;getElementPositionTop&quot; locator ))
3138
3139
3140</pre>
3141<h4><a name='codefunc9922' href='#docfunc9922'>selenium::get_element_width</a></h4>
3142<i><a href='#tocfunc9922'>Index</a></i><br>
3143
3144<pre>Retrieves the width of an element
3145
3146'locator' is an element locator pointing to an element
3147</pre>
3148<pre>(define (selenium::get_element_width sel-sess locator)
3149            (selenium::get-number sel-sess &quot;getElementWidth&quot; locator ))
3150
3151
3152</pre>
3153<h4><a name='codefunc35256' href='#docfunc35256'>selenium::get_element_height</a></h4>
3154<i><a href='#tocfunc35256'>Index</a></i><br>
3155
3156<pre>Retrieves the height of an element
3157
3158'locator' is an element locator pointing to an element
3159</pre>
3160<pre>(define (selenium::get_element_height sel-sess locator)
3161            (selenium::get-number sel-sess &quot;getElementHeight&quot; locator ))
3162
3163
3164</pre>
3165<h4><a name='codefunc50222' href='#docfunc50222'>selenium::get_cursor_position</a></h4>
3166<i><a href='#tocfunc50222'>Index</a></i><br>
3167
3168<pre>Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.
3169
3170Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to
3171return 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.
3172
3173This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element.
3174
3175'locator' is an element locator pointing to an input element or textarea
3176</pre>
3177<pre>(define (selenium::get_cursor_position sel-sess locator)
3178            (selenium::get-number sel-sess &quot;getCursorPosition&quot; locator ))
3179
3180
3181</pre>
3182<h4><a name='codefunc55031' href='#docfunc55031'>selenium::get_expression</a></h4>
3183<i><a href='#tocfunc55031'>Index</a></i><br>
3184
3185<pre>Returns the specified expression.
3186
3187This is useful because of JavaScript preprocessing.
3188It is used to generate commands like assertExpression and waitForExpression.
3189
3190
3191'expression' is the value to return
3192</pre>
3193<pre>(define (selenium::get_expression sel-sess expression)
3194            (selenium::get-string sel-sess &quot;getExpression&quot; expression ))
3195
3196
3197</pre>
3198<h4><a name='codefunc50024' href='#docfunc50024'>selenium::get_xpath_count</a></h4>
3199<i><a href='#tocfunc50024'>Index</a></i><br>
3200
3201<pre>Returns the number of nodes that match the specified xpath, eg. &quot;//table&quot; would give
3202the number of tables.
3203
3204'xpath' is the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you.
3205</pre>
3206<pre>(define (selenium::get_xpath_count sel-sess xpath)
3207            (selenium::get-number sel-sess &quot;getXpathCount&quot; xpath ))
3208
3209
3210</pre>
3211<h4><a name='codefunc37117' href='#docfunc37117'>selenium::assign_id</a></h4>
3212<i><a href='#tocfunc37117'>Index</a></i><br>
3213
3214<pre>Temporarily sets the &quot;id&quot; attribute of the specified element, so you can locate it in the future
3215using its ID rather than a slow/complicated XPath.  This ID will disappear once the page is
3216reloaded.
3217
3218'locator' is an element locator pointing to an element
3219'identifier' is a string to be used as the ID of the specified element
3220</pre>
3221<pre>(define (selenium::assign_id sel-sess locator identifier)
3222            (selenium::do-command sel-sess &quot;assignId&quot; locator identifier ))
3223
3224
3225</pre>
3226<h4><a name='codefunc35296' href='#docfunc35296'>selenium::allow_native_xpath</a></h4>
3227<i><a href='#tocfunc35296'>Index</a></i><br>
3228
3229<pre>Specifies whether Selenium should use the native in-browser implementation
3230of XPath (if any native version is available); if you pass &quot;false&quot; to
3231this function, we will always use our pure-JavaScript xpath library.
3232Using the pure-JS xpath library can improve the consistency of xpath
3233element locators between different browser vendors, but the pure-JS
3234version is much slower than the native implementations.
3235
3236'allow' is boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath
3237</pre>
3238<pre>(define (selenium::allow_native_xpath sel-sess allow)
3239            (selenium::do-command sel-sess &quot;allowNativeXpath&quot; allow ))
3240
3241
3242</pre>
3243<h4><a name='codefunc40388' href='#docfunc40388'>selenium::wait_for_condition</a></h4>
3244<i><a href='#tocfunc40388'>Index</a></i><br>
3245
3246<pre>Runs the specified JavaScript snippet repeatedly until it evaluates to &quot;true&quot;.
3247The snippet may have multiple lines, but only the result of the last line
3248will be considered.
3249
3250Note that, by default, the snippet will be run in the runner's test window, not in the window
3251of your application.  To get the window of your application, you can use
3252the JavaScript snippet &lt;tt&gt;selenium.browserbot.getCurrentWindow()&lt;/tt&gt;, and then
3253run your JavaScript in there
3254
3255
3256'script' is the JavaScript snippet to run
3257'timeout' is a timeout in milliseconds, after which this command will return with an error
3258</pre>
3259<pre>(define (selenium::wait_for_condition sel-sess script timeout)
3260            (selenium::do-command sel-sess &quot;waitForCondition&quot; script timeout ))
3261
3262
3263</pre>
3264<h4><a name='codefunc58794' href='#docfunc58794'>selenium::set_timeout</a></h4>
3265<i><a href='#tocfunc58794'>Index</a></i><br>
3266
3267<pre>Specifies the amount of time that Selenium will wait for actions to complete.
3268
3269Actions that require waiting include &quot;open&quot; and the &quot;waitFor*&quot; actions.
3270
3271The default timeout is 30 seconds.
3272
3273'timeout' is a timeout in milliseconds, after which the action will return with an error
3274</pre>
3275<pre>(define (selenium::set_timeout sel-sess timeout)
3276            (selenium::do-command sel-sess &quot;setTimeout&quot; timeout ))
3277
3278
3279</pre>
3280<h4><a name='codefunc65402' href='#docfunc65402'>selenium::wait_for_page_to_load</a></h4>
3281<i><a href='#tocfunc65402'>Index</a></i><br>
3282
3283<pre>Waits for a new page to load.
3284
3285You can use this command instead of the &quot;AndWait&quot; suffixes, &quot;clickAndWait&quot;, &quot;selectAndWait&quot;, &quot;typeAndWait&quot; etc.
3286(which are only available in the JS API).
3287Selenium constantly keeps track of new pages loading, and sets a &quot;newPageLoaded&quot;
3288flag when it first notices a page load.  Running any other Selenium command after
3289turns the flag to false.  Hence, if you want to wait for a page to load, you must
3290wait immediately after a Selenium command that caused a page-load.
3291
3292
3293'timeout' is a timeout in milliseconds, after which this command will return with an error
3294</pre>
3295<pre>(define (selenium::wait_for_page_to_load sel-sess timeout)
3296            (selenium::do-command sel-sess &quot;waitForPageToLoad&quot; timeout ))
3297
3298
3299</pre>
3300<h4><a name='codefunc24457' href='#docfunc24457'>selenium::wait_for_frame_to_load</a></h4>
3301<i><a href='#tocfunc24457'>Index</a></i><br>
3302
3303<pre>Waits for a new frame to load.
3304
3305Selenium constantly keeps track of new pages and frames loading,
3306and sets a &quot;newPageLoaded&quot; flag when it first notices a page load.
3307
3308
3309See waitForPageToLoad for more information.
3310
3311'frameAddress' is FrameAddress from the server side
3312'timeout' is a timeout in milliseconds, after which this command will return with an error
3313</pre>
3314<pre>(define (selenium::wait_for_frame_to_load sel-sess frameAddress timeout)
3315            (selenium::do-command sel-sess &quot;waitForFrameToLoad&quot; frameAddress timeout ))
3316
3317
3318</pre>
3319<h4><a name='codefunc57621' href='#docfunc57621'>selenium::get_cookie</a></h4>
3320<i><a href='#tocfunc57621'>Index</a></i><br>
3321
3322<pre>Return all cookies of the current page under test.
3323
3324</pre>
3325<pre>(define (selenium::get_cookie sel-sess )
3326            (selenium::get-string sel-sess &quot;getCookie&quot; ))
3327
3328
3329</pre>
3330<h4><a name='codefunc20954' href='#docfunc20954'>selenium::create_cookie</a></h4>
3331<i><a href='#tocfunc20954'>Index</a></i><br>
3332
3333<pre>Create a new cookie whose path and domain are same with those of current page
3334under test, unless you specified a path for this cookie explicitly.
3335
3336'nameValuePair' is name and value of the cookie in a format &quot;name=value&quot;
3337'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.
3338</pre>
3339<pre>(define (selenium::create_cookie sel-sess nameValuePair optionsString)
3340            (selenium::do-command sel-sess &quot;createCookie&quot; nameValuePair optionsString ))
3341
3342
3343</pre>
3344<h4><a name='codefunc18658' href='#docfunc18658'>selenium::delete_cookie</a></h4>
3345<i><a href='#tocfunc18658'>Index</a></i><br>
3346
3347<pre>Delete a named cookie with specified path.
3348
3349'name' is the name of the cookie to be deleted
3350'path' is the path property of the cookie to be deleted
3351</pre>
3352<pre>(define (selenium::delete_cookie sel-sess name path)
3353            (selenium::do-command sel-sess &quot;deleteCookie&quot; name path ))
3354
3355
3356</pre>
3357<h4><a name='codefunc59839' href='#docfunc59839'>selenium::set_browser_log_level</a></h4>
3358<i><a href='#tocfunc59839'>Index</a></i><br>
3359
3360<pre>Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded.
3361Valid logLevel strings are: &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot; or &quot;off&quot;.
3362To see the browser logs, you need to
3363either show the log window in GUI mode, or enable browser-side logging in Selenium RC.
3364
3365'logLevel' is one of the following: &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot; or &quot;off&quot;
3366</pre>
3367<pre>(define (selenium::set_browser_log_level sel-sess logLevel)
3368            (selenium::do-command sel-sess &quot;setBrowserLogLevel&quot; logLevel ))
3369
3370
3371</pre>
3372<h4><a name='codefunc62004' href='#docfunc62004'>selenium::run_script</a></h4>
3373<i><a href='#tocfunc62004'>Index</a></i><br>
3374
3375<pre>Creates a new &quot;script&quot; tag in the body of the current test window, and
3376adds the specified text into the body of the command.  Scripts run in
3377this way can often be debugged more easily than scripts executed using
3378Selenium's &quot;getEval&quot; command.  Beware that JS exceptions thrown in these script
3379tags aren't managed by Selenium, so you should probably wrap your script
3380in try/catch blocks if there is any chance that the script will throw
3381an exception.
3382
3383'script' is the JavaScript snippet to run
3384</pre>
3385<pre>(define (selenium::run_script sel-sess script)
3386            (selenium::do-command sel-sess &quot;runScript&quot; script ))
3387
3388
3389</pre>
3390<h4><a name='codefunc2699' href='#docfunc2699'>selenium::add_location_strategy</a></h4>
3391<i><a href='#tocfunc2699'>Index</a></i><br>
3392
3393<pre>Defines a new function for Selenium to locate elements on the page.
3394For example,
3395if you define the strategy &quot;foo&quot;, and someone runs click(&quot;foo=blah&quot;), we'll
3396run your function, passing you the string &quot;blah&quot;, and click on the element
3397that your function
3398returns, or throw an &quot;Element not found&quot; error if your function returns null.
3399
3400We'll pass three arguments to your function:
3401locator: the string the user passed ininWindow: the currently selected windowinDocument: the currently selected document
3402
3403The function must return null if the element can't be found.
3404
3405'strategyName' is the name of the strategy to define; this should use only   letters [a-zA-Z] with no spaces or other punctuation.
3406'functionDefinition' is a string defining the body of a function in JavaScript.   For example: &lt;tt&gt;return inDocument.getElementById(locator);&lt;/tt&gt;
3407</pre>
3408<pre>(define (selenium::add_location_strategy sel-sess strategyName functionDefinition)
3409            (selenium::do-command sel-sess &quot;addLocationStrategy&quot; strategyName functionDefinition ))
3410
3411
3412</pre>
3413<h4><a name='codefunc64912' href='#docfunc64912'>selenium::set_context</a></h4>
3414<i><a href='#tocfunc64912'>Index</a></i><br>
3415
3416<pre>Writes a message to the status bar and adds a note to the browser-side
3417log.
3418
3419'context' is the message to be sent to the browser
3420</pre>
3421<pre>(define (selenium::set_context sel-sess context)
3422            (selenium::do-command sel-sess &quot;setContext&quot; context ))
3423
3424
3425</pre>
3426<h4><a name='codefunc38874' href='#docfunc38874'>selenium::capture_screenshot</a></h4>
3427<i><a href='#tocfunc38874'>Index</a></i><br>
3428
3429<pre>Captures a PNG screenshot to the specified file.
3430
3431'filename' is the absolute path to the file to be written, e.g. &quot;c:\blah\screenshot.png&quot;
3432</pre>
3433<pre>(define (selenium::capture_screenshot sel-sess filename)
3434            (selenium::do-command sel-sess &quot;captureScreenshot&quot; filename ))
3435
3436
3437
3438
3439
3440</pre></body></html>
Note: See TracBrowser for help on using the repository browser.