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
U
[±dÚã@sPddlmZddlmZddlmZddlmZddlmZGdd„deƒZ    d    S)
é)Ú
WebElementé)Ú interaction)Ú Interaction)Ú MouseButton)Ú PointerInputc sÄeZdZd‡fdd„    Zejdddddddddf
dd„Zejfdd„Zd d
d „Zd!d d „Z    d"dd„Z
dejfdd„Z d#dd„Z dejfdd„Z ejfdd„Zd$dd„Zd%edœdd„Zdd„Z‡ZS)&ÚPointerActionsNéúcs,|sttjdƒ}||_||_tƒ |¡dS)z•
        Args:
        - source: PointerInput instance
        - duration: override the default 250 msecs of DEFAULT_MOVE_DURATION in source
        ZmouseN)rrZ POINTER_MOUSEÚsourceÚ    _durationÚsuperÚ__init__)Úselfr
Úduration©Ú    __class__©úhd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/actions/pointer_actions.pyr s
 zPointerActions.__init__c Cs$|jd|||||||||    |
d |S)NZcreate_pointer_down)
ÚbuttonÚwidthÚheightÚpressureÚtangential_pressureÚtilt_xÚtilt_yÚtwistÚaltitude_angleÚ azimuth_angle©Ú_button_action) rrrrrrrrrrrrrrÚ pointer_down's õ zPointerActions.pointer_downcCs|jd|d|S)NZcreate_pointer_up©rr©rrrrrÚ
pointer_upCszPointerActions.pointer_uprc CsFt|tƒstdƒ‚|jj||jt|ƒt|ƒ||||||    |
| | d |S)Nzmove_to requires a WebElement© ÚoriginrÚxÚyrrrrrrrrr)Ú
isinstancerÚAttributeErrorr
Úcreate_pointer_mover Úint) rÚelementr&r'rrrrrrrrrrrrÚmove_toGs$
ózPointerActions.move_toc Cs6|jjtj|jt|ƒt|ƒ|||||||    |
| d |S)Nr$)r
r*rÚPOINTERr r+© rr&r'rrrrrrrrrrrrÚmove_byjs ózPointerActions.move_byc Cs4|jjd|jt|ƒt|ƒ|||||||    |
| d |S)NZviewportr$)r
r*r r+r/rrrÚmove_to_location‰s ózPointerActions.move_to_locationcCs&|r| |¡| |¡| |¡|S©N)r-r r#©rr,rrrrÚclick¨s
 
 
 
zPointerActions.clickcCs|j|tjdS)N)r,r)r4rÚRIGHT©rr,rrrÚ context_click¯szPointerActions.context_clickcCs|r| |¡|j|d|S©Nr!)r-r r3rrrÚclick_and_hold²s
 zPointerActions.click_and_holdcCs|j|d|Sr8)r#r"rrrÚrelease¸s zPointerActions.releasecCsB|r| |¡| tj¡| tj¡| tj¡| tj¡|Sr2)r-r rÚLEFTr#r6rrrÚ double_click¼s
    zPointerActions.double_click)rcCs|j |¡|Sr2)r
Z create_pause)rrrrrÚpauseÅs zPointerActions.pausecKst|j|ƒ}|f|Ž|Sr2)Úgetattrr
)rÚactionÚkwargsÚmethrrrrÉs 
zPointerActions._button_action)Nr    ) rrNNNNNNNNN)    NNNNNNNNN)    NNNNNNNNN)N)N)r)Ú__name__Ú
__module__Ú __qualname__r rr;r r#r-r0r1r4r7r9r:r<Úfloatr=rÚ __classcell__rrrrrshõ
ó
'ô
#ô
 
 
    rN)
Z$selenium.webdriver.remote.webelementrÚrrZ mouse_buttonrZ pointer_inputrrrrrrÚ<module>s