"Fossies" - the Fresh Open Source Software Archive 
Member "selenium-selenium-4.8.1/dotnet/test/webdriverbackedselenium/TestWait.cs" (17 Feb 2023, 1563 Bytes) of package /linux/www/selenium-selenium-4.8.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C# source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 using NUnit.Framework;
2
3 namespace Selenium.Tests
4 {
5 [TestFixture]
6 public class TestWait : SeleniumTestCaseBase
7 {
8 [Test]
9 public void ShouldBeAbleToWait()
10 {
11 // Link click
12 selenium.Open("../tests/html/test_reload_onchange_page.html");
13 selenium.Click("theLink");
14 selenium.WaitForPageToLoad("30000");
15 // Page should reload
16 Assert.AreEqual(selenium.GetTitle(), "Slow Loading Page");
17 selenium.Open("../tests/html/test_reload_onchange_page.html");
18 selenium.Select("theSelect", "Second Option");
19 selenium.WaitForPageToLoad("30000");
20 // Page should reload
21 Assert.AreEqual(selenium.GetTitle(), "Slow Loading Page");
22 // Textbox with onblur
23 selenium.Open("../tests/html/test_reload_onchange_page.html");
24 selenium.Type("theTextbox", "new value");
25 selenium.FireEvent("theTextbox", "blur");
26 selenium.WaitForPageToLoad("30000");
27 Assert.AreEqual(selenium.GetTitle(), "Slow Loading Page");
28 // Submit button
29 selenium.Open("../tests/html/test_reload_onchange_page.html");
30 selenium.Click("theSubmit");
31 selenium.WaitForPageToLoad("30000");
32 Assert.AreEqual(selenium.GetTitle(), "Slow Loading Page");
33 selenium.Click("slowPage_reload");
34 selenium.WaitForPageToLoad("30000");
35 Assert.AreEqual(selenium.GetTitle(), "Slow Loading Page");
36 }
37 }
38 }