Beispiel #1
0
        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");
            }
        }
Beispiel #2
0
        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");
            }
        }
Beispiel #3
0
        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");
            }
        }