Sub SendWhatsAppMessage() Dim driver As New Selenium.WebDriver Dim message As String message = "This is a test message" ' Start the WhatsApp desktop application driver.Start "chrome", "https://web.whatsapp.com" ' Wait for the application to load driver.Wait (20) ' Find the contact you want to send the message to driver.FindElementById("side").FindElementsByClass("_1wjpf").Click ' Wait for the chat window to load driver.Wait (5) ' Find the text input field and send the message driver.FindElementById("main").FindElementByClass("_3uMse").SendKeys message ' Find the send button and click it driver.FindElementById("main").FindElementByClass("_1U1xa").Click End Sub