The phone number shared via url is invalid

Viewed 85

Hi I tried to create a whatsapp automation program. I used the following command to open whatsapp in selenium

driver.get('https://web.whatsapp.com/send?phone={}'.format(x))

So I have no issue with the coding part. My issue is for some numbers the above code is opening properly and for some numbers the above code is showing the error the phone number shared via the url is invalid even though the number exists(also has working whatsapp).

So is there any solution?

1 Answers

Show this answer

you can use js to open chat without load page every time and you can check if current number is your

Related