forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselenium.webdriver.common.touch_actions.html
326 lines (305 loc) · 15.6 KB
/
selenium.webdriver.common.touch_actions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>selenium.webdriver.common.touch_actions — Selenium 2.0 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2.0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="Selenium 2.0 documentation" href="../index.html" />
<link rel="up" title="Selenium Documentation" href="../api.html" />
<link rel="next" title="selenium.webdriver.common.utils" href="selenium.webdriver.common.utils.html" />
<link rel="prev" title="selenium.webdriver.common.keys" href="selenium.webdriver.common.keys.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="selenium.webdriver.common.utils.html" title="selenium.webdriver.common.utils"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="selenium.webdriver.common.keys.html" title="selenium.webdriver.common.keys"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">Selenium 2.0 documentation</a> »</li>
<li><a href="../api.html" accesskey="U">Selenium Documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-selenium.webdriver.common.touch_actions">
<span id="selenium-webdriver-common-touch-actions"></span><h1>selenium.webdriver.common.touch_actions<a class="headerlink" href="#module-selenium.webdriver.common.touch_actions" title="Permalink to this headline">¶</a></h1>
<p>The Touch Actions implementation</p>
<dl class="class">
<dt id="selenium.webdriver.common.touch_actions.TouchActions">
<em class="property">class </em><tt class="descclassname">selenium.webdriver.common.touch_actions.</tt><tt class="descname">TouchActions</tt><big>(</big><em>driver</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate touch actions. Works like ActionChains; actions are stored in the
TouchActions object and are fired with perform().</p>
<p>Creates a new TouchActions object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>driver: The WebDriver instance which performs user actions.
It should be with touchscreen enabled.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.double_tap">
<tt class="descname">double_tap</tt><big>(</big><em>on_element</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.double_tap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.double_tap" title="Permalink to this definition">¶</a></dt>
<dd><p>Double taps on a given element.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>on_element: The element to tap.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.flick">
<tt class="descname">flick</tt><big>(</big><em>xspeed</em>, <em>yspeed</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.flick"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.flick" title="Permalink to this definition">¶</a></dt>
<dd><p>Flicks, starting anywhere on the screen.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>xspeed: The X speed in pixels per second.</li>
<li>yspeed: The Y speed in pixels per second.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.flick_element">
<tt class="descname">flick_element</tt><big>(</big><em>on_element</em>, <em>xoffset</em>, <em>yoffset</em>, <em>speed</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.flick_element"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.flick_element" title="Permalink to this definition">¶</a></dt>
<dd><p>Flick starting at on_element, and moving by the xoffset and yoffset
with specified speed.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>on_element: Flick will start at center of element.</li>
<li>xoffset: X offset to flick to.</li>
<li>yoffset: Y offset to flick to.</li>
<li>speed: Pixels per second to flick.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.long_press">
<tt class="descname">long_press</tt><big>(</big><em>on_element</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.long_press"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.long_press" title="Permalink to this definition">¶</a></dt>
<dd><p>Long press on an element.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>on_element: The element to long press.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.move">
<tt class="descname">move</tt><big>(</big><em>xcoord</em>, <em>ycoord</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.move"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.move" title="Permalink to this definition">¶</a></dt>
<dd><p>Move held tap to specified location.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>xcoord: X Coordinate to move.</li>
<li>ycoord: Y Coordinate to move.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.perform">
<tt class="descname">perform</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.perform"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.perform" title="Permalink to this definition">¶</a></dt>
<dd><p>Performs all stored actions.</p>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.release">
<tt class="descname">release</tt><big>(</big><em>xcoord</em>, <em>ycoord</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.release"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.release" title="Permalink to this definition">¶</a></dt>
<dd><p>Release previously issued tap ‘and hold’ command at specified location.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>xcoord: X Coordinate to release.</li>
<li>ycoord: Y Coordinate to release.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.scroll">
<tt class="descname">scroll</tt><big>(</big><em>xoffset</em>, <em>yoffset</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.scroll"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.scroll" title="Permalink to this definition">¶</a></dt>
<dd><p>Touch and scroll, moving by xoffset and yoffset.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>xoffset: X offset to scroll to.</li>
<li>yoffset: Y offset to scroll to.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.scroll_from_element">
<tt class="descname">scroll_from_element</tt><big>(</big><em>on_element</em>, <em>xoffset</em>, <em>yoffset</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.scroll_from_element"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.scroll_from_element" title="Permalink to this definition">¶</a></dt>
<dd><p>Touch and scroll starting at on_element, moving by xoffset and yoffset.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>on_element: The element where scroll starts.</li>
<li>xoffset: X offset to scroll to.</li>
<li>yoffset: Y offset to scroll to.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.tap">
<tt class="descname">tap</tt><big>(</big><em>on_element</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.tap"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.tap" title="Permalink to this definition">¶</a></dt>
<dd><p>Taps on a given element.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>on_element: The element to tap.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="selenium.webdriver.common.touch_actions.TouchActions.tap_and_hold">
<tt class="descname">tap_and_hold</tt><big>(</big><em>xcoord</em>, <em>ycoord</em><big>)</big><a class="reference internal" href="../_modules/selenium/webdriver/common/touch_actions.html#TouchActions.tap_and_hold"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#selenium.webdriver.common.touch_actions.TouchActions.tap_and_hold" title="Permalink to this definition">¶</a></dt>
<dd><p>Touch down at given coordinates.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Args :</th><td class="field-body"><ul class="first last simple">
<li>xcoord: X Coordinate to touch down.</li>
<li>ycoord: Y Coordinate to touch down.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="selenium.webdriver.common.keys.html"
title="previous chapter">selenium.webdriver.common.keys</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="selenium.webdriver.common.utils.html"
title="next chapter">selenium.webdriver.common.utils</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/webdriver/selenium.webdriver.common.touch_actions.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="selenium.webdriver.common.utils.html" title="selenium.webdriver.common.utils"
>next</a> |</li>
<li class="right" >
<a href="selenium.webdriver.common.keys.html" title="selenium.webdriver.common.keys"
>previous</a> |</li>
<li><a href="../index.html">Selenium 2.0 documentation</a> »</li>
<li><a href="../api.html" >Selenium Documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2011, plightbo, simon.m.stewart, hbchai, jrhuggins, et al..
</div>
</body>
</html>