public async Task TestCreateWithAngularJs() { using (Browser browser = await BrowserFactory.CreateAsync(simpleHost)) { // Act await browser.VisitAsync(new Uri("http://test/angular_test.html")); // Assert string text = await browser.TextAsync("div"); text.Should().Be("This is a test"); } }
public async Task TestPressButtonWithJQuery() { using (Browser browser = await BrowserFactory.CreateAsync(host)) { // Act await browser.VisitAsync(new Uri("http://test/testpost.html")); await browser.FillAsync("#hometown", "Whakatane"); await browser.PressButtonAsync("#testPost"); // Assert string text = await browser.TextAsync("#result"); text.Should().Be("Hometown = Whakatane in da house"); } }
public async Task TestCreate() { //EdgeJs.NativeModuleSupport.EdgeWithNativeModules.RegisterPreCompiledModules("zombie"); BrowserOptions options = new BrowserOptions() { WaitDuration = TimeSpan.FromMinutes(10) }; using (Browser browser = await BrowserFactory.CreateAsync(host, options)) { await browser.VisitAsync(new Uri("http://localhost.test/Account/Login")); string html = await browser.HtmlAsync(); /*string cookies = await browser.SaveCookiesAsync(); * string test = cookies;*/ html.Should().Contain("Zombie.Net tests"); } }