public void SendCurrentWeather() { UserList userList = new UserList(); List <string> users = userList.getUsers(); WSResponce respObject = new WSResponce(); current response = new current(); response = respObject.CurrentWeatherResponse(CurrentUrl); ComposeMessage newMessage = new ComposeMessage(); string message = newMessage.CreateMessage(response); ChromeOptions options = new ChromeOptions(); options.AddArgument(cache); driver = new ChromeDriver(options); StartPage startPage = new StartPage(driver); startPage.GoToUrl(); foreach (string user in users) { startPage.OpenChat(user); startPage.SendMesage(message); } driver.Quit(); }
static void Main(string[] args) { WSResponce respObject = new WSResponce(); string response = respObject.GetFormattedXml(CurrentUrl); Console.WriteLine(response); Console.WriteLine("__________________________"); ComposeMessage newMessage = new ComposeMessage(); MessageSending messageTemplate = new MessageSending(); messageTemplate.SendMessage(newMessage.CreateMessage(response)); Console.ReadLine(); }