public void InitBrowserNoException() { IBrowserClient client = new PlatinumBrowserClient(); Assert.DoesNotThrow(() => { client.InitBrowser(); }); client.CloseBrowser(); }
public void ClosePageNotInitiated() { IBrowserClient client = new PlatinumBrowserClient(); client.ClosePage("0"); client.CloseBrowser(); }
public void RefreshPageBrowserNotInitiated() { IBrowserClient client = new PlatinumBrowserClient(); client.RefreshPage("0"); client.CloseBrowser(); }
public void CloseBrowserInitiated() { IBrowserClient client = new PlatinumBrowserClient(); client.InitBrowser(); client.CloseBrowser(); }
public void OpenPageBrowserNotInitiated(string url) { IBrowserClient client = new PlatinumBrowserClient(); client.CloseBrowser(); RequestException ex = Assert.Throws <RequestException>(() => client.Open("0", url)); Assert.That(ex, Is.Not.Null); }
public void GetSiteSourceNotInitiated() { IBrowserClient client = new PlatinumBrowserClient(); client.DeInit(); client.CloseBrowser(); RequestException ex = Assert.Throws <RequestException>(() => client.CurrentSiteSource("0")); Assert.That(ex, Is.Not.Null); }
public void RefreshPageBrowserInitiated() { IBrowserClient client = new PlatinumBrowserClient(); client.InitBrowser(); string pageId = client.CreatePage(); client.RefreshPage(pageId); client.CloseBrowser(); }
public void CloseBrowserInitiatedAndPageOpened() { IBrowserClient client = new PlatinumBrowserClient(); client.InitBrowser(); string pageId = client.CreatePage(); client.Open(pageId, "https://google.pl"); client.CloseBrowser(); }
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(); }); }