示例#1
0
        public async Task TestRefreshAsync()
        {
            BrowserStandard browser  = new BrowserStandard();
            IDocument       document = await browser.NavigateAsync("https://github.com");

            IDocument documentRefreshed = await browser.RefreshAsync();

            Assert.True(documentRefreshed == browser.Document);
            Assert.True(documentRefreshed != document);
            IDocument secondDocument = browser.Navigate(RequestTesterRouteUri);
            IDocument thirdDocument  = browser.Navigate("https://nuget.org");

            browser.Back();
            await browser.RefreshAsync();

            Assert.True(browser.Document != secondDocument);
            Assert.True(browser.Document.Response.ResponseUri == secondDocument.Response.ResponseUri);
        }