BrowserGoForwardAsync

Parent Previous Next

BrowserGoForwardAsync

Описание: метод навигации браузера выполняет действие вперед с указанным ожиданием в секундах

Флаг abortLoadAfterTime принудительно завершает загрузку страницы после завершения таймера

Синтаксис: BrowserGoForwardAsync(int sec, bool abortLoadAfterTime = false)

Возвращаемое значение: отсутствует



Пример:

Tester tester = new Tester(browserForm);

await tester.TestBeginAsync();

await tester.GoToUrlAsync("https://www.yahoo.com/", 5);

string currentUrl = await tester.GetUrlAsync();

await tester.AssertEqualsAsync("https://www.yahoo.com/", currentUrl);


await tester.GoToUrlAsync("https://yandex.ru/", 5);

currentUrl = await tester.GetUrlAsync();

await tester.AssertEqualsAsync("https://yandex.ru/", currentUrl);

               

await tester.BrowserGoBackAsync(10);

currentUrl = await tester.GetUrlAsync();

await tester.AssertEqualsAsync("https://www.yahoo.com/", currentUrl);


await tester.BrowserGoForwardAsync(10);

currentUrl = await tester.GetUrlAsync();

await tester.AssertEqualsAsync("https://yandex.ru/", currentUrl);

await tester.TestEndAsync();

Created with the Personal Edition of HelpNDoc: Easily create Help documents