xref: /plugin/combo/vendor/php-webdriver/webdriver/lib/Interactions/Touch/WebDriverTouchScreen.php (revision 04fd306c7c155fa133ebb3669986875d65988276)
1*04fd306cSNickeau<?php
2*04fd306cSNickeau
3*04fd306cSNickeaunamespace Facebook\WebDriver\Interactions\Touch;
4*04fd306cSNickeau
5*04fd306cSNickeauuse Facebook\WebDriver\WebDriverElement;
6*04fd306cSNickeau
7*04fd306cSNickeau/**
8*04fd306cSNickeau * Interface representing touch screen operations.
9*04fd306cSNickeau */
10*04fd306cSNickeauinterface WebDriverTouchScreen
11*04fd306cSNickeau{
12*04fd306cSNickeau    /**
13*04fd306cSNickeau     * Single tap on the touch enabled device.
14*04fd306cSNickeau     *
15*04fd306cSNickeau     * @param WebDriverElement $element
16*04fd306cSNickeau     * @return $this
17*04fd306cSNickeau     */
18*04fd306cSNickeau    public function tap(WebDriverElement $element);
19*04fd306cSNickeau
20*04fd306cSNickeau    /**
21*04fd306cSNickeau     * Double tap on the touch screen using finger motion events.
22*04fd306cSNickeau     *
23*04fd306cSNickeau     * @param WebDriverElement $element
24*04fd306cSNickeau     * @return $this
25*04fd306cSNickeau     */
26*04fd306cSNickeau    public function doubleTap(WebDriverElement $element);
27*04fd306cSNickeau
28*04fd306cSNickeau    /**
29*04fd306cSNickeau     * Finger down on the screen.
30*04fd306cSNickeau     *
31*04fd306cSNickeau     * @param int $x
32*04fd306cSNickeau     * @param int $y
33*04fd306cSNickeau     * @return $this
34*04fd306cSNickeau     */
35*04fd306cSNickeau    public function down($x, $y);
36*04fd306cSNickeau
37*04fd306cSNickeau    /**
38*04fd306cSNickeau     * Flick on the touch screen using finger motion events. Use this flick
39*04fd306cSNickeau     * command if you don't care where the flick starts on the screen.
40*04fd306cSNickeau     *
41*04fd306cSNickeau     * @param int $xspeed
42*04fd306cSNickeau     * @param int $yspeed
43*04fd306cSNickeau     * @return $this
44*04fd306cSNickeau     */
45*04fd306cSNickeau    public function flick($xspeed, $yspeed);
46*04fd306cSNickeau
47*04fd306cSNickeau    /**
48*04fd306cSNickeau     * Flick on the touch screen using finger motion events.
49*04fd306cSNickeau     * This flickcommand starts at a particular screen location.
50*04fd306cSNickeau     *
51*04fd306cSNickeau     * @param WebDriverElement $element
52*04fd306cSNickeau     * @param int $xoffset
53*04fd306cSNickeau     * @param int $yoffset
54*04fd306cSNickeau     * @param int $speed
55*04fd306cSNickeau     * @return $this
56*04fd306cSNickeau     */
57*04fd306cSNickeau    public function flickFromElement(
58*04fd306cSNickeau        WebDriverElement $element,
59*04fd306cSNickeau        $xoffset,
60*04fd306cSNickeau        $yoffset,
61*04fd306cSNickeau        $speed
62*04fd306cSNickeau    );
63*04fd306cSNickeau
64*04fd306cSNickeau    /**
65*04fd306cSNickeau     * Long press on the touch screen using finger motion events.
66*04fd306cSNickeau     *
67*04fd306cSNickeau     * @param WebDriverElement $element
68*04fd306cSNickeau     * @return $this
69*04fd306cSNickeau     */
70*04fd306cSNickeau    public function longPress(WebDriverElement $element);
71*04fd306cSNickeau
72*04fd306cSNickeau    /**
73*04fd306cSNickeau     * Finger move on the screen.
74*04fd306cSNickeau     *
75*04fd306cSNickeau     * @param int $x
76*04fd306cSNickeau     * @param int $y
77*04fd306cSNickeau     * @return $this
78*04fd306cSNickeau     */
79*04fd306cSNickeau    public function move($x, $y);
80*04fd306cSNickeau
81*04fd306cSNickeau    /**
82*04fd306cSNickeau     * Scroll on the touch screen using finger based motion events. Use this
83*04fd306cSNickeau     * command if you don't care where the scroll starts on the screen.
84*04fd306cSNickeau     *
85*04fd306cSNickeau     * @param int $xoffset
86*04fd306cSNickeau     * @param int $yoffset
87*04fd306cSNickeau     * @return $this
88*04fd306cSNickeau     */
89*04fd306cSNickeau    public function scroll($xoffset, $yoffset);
90*04fd306cSNickeau
91*04fd306cSNickeau    /**
92*04fd306cSNickeau     * Scroll on the touch screen using finger based motion events. Use this
93*04fd306cSNickeau     * command to start scrolling at a particular screen location.
94*04fd306cSNickeau     *
95*04fd306cSNickeau     * @param WebDriverElement $element
96*04fd306cSNickeau     * @param int $xoffset
97*04fd306cSNickeau     * @param int $yoffset
98*04fd306cSNickeau     * @return $this
99*04fd306cSNickeau     */
100*04fd306cSNickeau    public function scrollFromElement(
101*04fd306cSNickeau        WebDriverElement $element,
102*04fd306cSNickeau        $xoffset,
103*04fd306cSNickeau        $yoffset
104*04fd306cSNickeau    );
105*04fd306cSNickeau
106*04fd306cSNickeau    /**
107*04fd306cSNickeau     * Finger up on the screen.
108*04fd306cSNickeau     *
109*04fd306cSNickeau     * @param int $x
110*04fd306cSNickeau     * @param int $y
111*04fd306cSNickeau     * @return $this
112*04fd306cSNickeau     */
113*04fd306cSNickeau    public function up($x, $y);
114*04fd306cSNickeau}
115