コード例 #1
0
        public void RefreshPageBrowserInitiated()
        {
            IBrowserClient client = new PlatinumBrowserClient();

            client.InitBrowser();
            string pageId = client.CreatePage();

            client.RefreshPage(pageId);
            client.CloseBrowser();
        }
コード例 #2
0
        public void CloseBrowserInitiatedAndPageOpened()
        {
            IBrowserClient client = new PlatinumBrowserClient();

            client.InitBrowser();
            string pageId = client.CreatePage();

            client.Open(pageId, "https://google.pl");
            client.CloseBrowser();
        }
コード例 #3
0
        public void GetSiteSourceInitiated()
        {
            IBrowserClient client = new PlatinumBrowserClient();

            client.InitBrowser();
            string pageId = client.CreatePage();

            client.Open(pageId, "http://allegro.pl");
            Assert.DoesNotThrow(() =>
            {
                string response = client.CurrentSiteSource(pageId);
                Assert.NotNull(response);
                Assert.True(response.Contains("<div"));
                client.ClosePage(pageId);
                client.CloseBrowser();
            });
        }