I am making a fairly simple code to send WhatsApp messages through Python and I need to use line breaks.
For example, if the message is "Dear Student, Please send your report Thank you for your attention"
The message on WhatsApp should look like
Dear Student,
Please send your report
Thank you for your attention
Attempts with \ n have not worked. The text must be in a single message. Below the code that I have advanced, thanks in advance for the help.
# Necessary libraries
import pyautogui as pg
import webbrowser as web
import time
message = "Dear Student, \n Please send your report\n Thank you for your attention"
number = 'XX_XXXXXXXXX'
web.open("https://web.whatsapp.com/send?phone="+number+"&text="+message)
time.sleep(12) # wait for the page to load
pg.click(1335, 690) # click on the submit button location