Dec-11-2019, 04:15 PM
(This post was last modified: Dec-11-2019, 04:15 PM by akanowhere.)
Sorry for this..but i don´t know where the error was occuried. Well I did like you told me to do: I removed all try´s and excepts
from time import sleep from selenium.webdriver.common.by import By from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait import socket #import csv message_text='Ola essa é uma mensagem automatizada de Whats App.' # message no_of_message = 1 # no. of time moblie_no_list = [5551981440050, 5559182073305] # list of phone number #moblie_no_list= open('entrada.csv', 'r') def element_presence(by,xpath,time): element_present = EC.presence_of_element_located((By.XPATH, xpath)) WebDriverWait(driver, time).until(element_present) def is_connected(): driver = webdriver.Chrome(executable_path="D:\Programas\Aulas\scripts\Projetos\whatsautomatico\chromedriver.exe") driver.get("http://web.whatsapp.com") sleep(10) #wait time to scan the code in second def send_whatsapp_msg(phone_no,text): driver.get("https://web.whatsapp.com/send?phone={}&source=&data=#".format(phone_no))
Error:[error]driver
= webdriver.Chrome(executable_path="D:\Programas\Aulas\scripts\Projetos\whatsautomatico\chromedriver.exe")Error:expected an indent block
[/error]