BrowserGoForwardAsync

Parent Previous Next

BrowserGoForwardAsync

Description: the browser's navigation method performs the forward action with the specified wait in seconds

The abortLoadAfterTime flag automatically completes page loading after the timer is completed

Syntax: BrowserGoForwardAsync(int sec, bool abortLoadAfterTime = false)

Return value: no return value



Example:

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: Produce online help for Qt applications