How can I open the same page in Chrome without opening a new page webbrowser python

39 views Asked by At

i do not need to open new page in chrome, I have to use the same existing page

I am trying to send WhatsApp messages using Python from the web, but every time it opens a new page and downloads WhatsApp Web again. I need help

def sendwhatmsg_instantly(phone_no: str, message: str, wait_time: int = 20) -> None: """Send WhatsApp Message Instantly""" parsed_message = quote(message)

web.open(f"https://web.whatsapp.com/send?phone={phone_no}&text={quote(message)}")
time.sleep(wait_time)
pg.press('enter')
0

There are 0 answers