-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbotVotacao.py
More file actions
29 lines (24 loc) · 1000 Bytes
/
botVotacao.py
File metadata and controls
29 lines (24 loc) · 1000 Bytes
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
# Bot para votar em Google Forms
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
class voteBot:
def __init__(self):
self.driver = webdriver.Chrome(executable_path=r'C:/Users/Rayanne/Desktop/Bots-Python/chromedriver.exe')
def open(self):
driver = self.driver
driver.get('')
self.vote()
def vote(self):
driver = self.driver
spans = driver.find_elements_by_xpath("//span[@class='docssharedWizToggleLabeledLabelText exportLabel freebirdFormviewerComponentsQuestionRadioLabel']");
for i in range(len(spans)):
if spans[i].text == "":
spans[i].click()
btnSend = driver.find_elements_by_xpath("//span[@class='appsMaterialWizButtonPaperbuttonLabel quantumWizButtonPaperbuttonLabel exportLabel']");
btnSend[1].click()
testBot = voteBot()
times = 1000
for i in range(0,times):
print("Execução de número ", i)
testBot.open()