Пример #1
0
        public async Task <bool> CancelAsync(string bookingNumber)
        {
            // Wait for login to actually redirect to the customer profile page
            await _session.WaitForElementToAppearAsync(Cancel.BookingsTable);

            var clicked = await _session.TryInvokeOnElementAsync(Cancel.CancelLink(bookingNumber), x => x.Click());

            if (!clicked)
            {
                return(false);
            }

            await _session.WaitForElementToAppearAsync(Cancel.CancelPopupMessageDiv);

            await _session.InvokeOnElementAsync(Cancel.ConfirmButton, x => x.Click());

            await _session.WaitForAsync(driver => driver.Title.Contains("Booking annulleret"));

            return(true);
        }