-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestesPyAutoGUI.py
79 lines (50 loc) · 1.23 KB
/
TestesPyAutoGUI.py
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
import pyperclip
import pyautogui
import time
screenWidth, screenHeight = pyautogui.size() # setar padrão tela
screenWidth, screenHeight
(2560, 1440)
currentMouseX, currentMouseY = pyautogui.position() # setar padrão mouse
currentMouseX, currentMouseY
(1314, 345)
#load excel referencias
pyautogui.click(165,755)
time.sleep(3)
pyautogui.click(751,154)
time.sleep(3)
pyautogui.write('D:\OneDrive\Documents\****')
pyautogui.press('enter')
pyautogui.doubleClick(436,263)
time.sleep(3)
#verify first
pyautogui.keyDown('ctrl')
pyautogui.press('up')
pyautogui.keyUp('ctrl')
pyautogui.keyDown('ctrl')
pyautogui.press('left', presses= 5)
pyautogui.keyUp('ctrl')
pyautogui.keyDown('ctrl')
pyautogui.press('c')
pyautogui.keyUp('ctrl')
codigo = pyperclip.paste()
#buscar infos
pyautogui.click(122,749)
pyautogui.PAUSE = 1
pyautogui.click(348,51)
pyautogui.PAUSE = 1
pyautogui.write('www.*****.com.br/pt/')
pyautogui.press('enter')
pyautogui.moveTo(706,140)
pyautogui.click()
pyautogui.PAUSE = 3
time.sleep(3)
pyautogui.click(432,140)
pyautogui.write(codigo)
pyautogui.press('enter')
# copy
pyautogui.moveTo(638,362)
pyautogui.click(clicks=3)
pyautogui.keyDown('ctrl')
pyautogui.press('c')
pyautogui.keyUp('ctrl')
copyref = pyperclip.paste()