ConnectAsync() public method

public ConnectAsync ( ) : Task
return Task
        public async Task Send_attachments()
        {
            //const string password = "******";

            //var driver = new RocketChatDriver("demo.rocket.chat", true, _xUnitLogger);
            var userName = Constants.OneEmail;
            var password = Constants.OnePassword;

            var driver = new RocketChatDriver(Constants.RocketServer, false, _xUnitLogger);

            await driver.ConnectAsync();
            await driver.LoginWithEmailAsync(userName, password);

            var roomId = await driver.GetRoomIdAsync("GENERAL");

            //var a = await driver.SendCustomMessageAsync("test mesage", "name", roomId.Result);

            driver.Dispose();
        }
        public async Task Can_login()
        {
            //const string password = "******";

            //var driver = new RocketChatDriver("demo.rocket.chat", true, _xUnitLogger);

            var driver = new RocketChatDriver(Constants.RocketServer, false, _xUnitLogger);

            await driver.ConnectAsync();
            var loginResult = await driver.LoginWithEmailAsync(Constants.OneEmail, Constants.OnePassword);

            var roomId = await driver.GetRoomIdAsync("GENERAL");

            await driver.JoinRoomAsync(roomId.Result);

            await driver.SubscribeToRoomAsync(roomId.Result);

            var messages = await driver.SendMessageAsync("", roomId.Result);

            driver.Dispose();
        }
        private static async Task<IRocketChatDriver> ComposeAsync()
        {
            var driver = new RocketChatDriver(Constants.RocketServer, false);
            await driver.ConnectAsync();
            await driver.LoginWithEmailAsync(Constants.OneEmail, Constants.OnePassword);
            await driver.SubscribeToRoomListAsync();

            return driver;
        }