forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestFramesOpen.cs
28 lines (27 loc) · 1.07 KB
/
TestFramesOpen.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using System.Text.RegularExpressions;
namespace Selenium.Tests
{
[TestFixture]
public class TestFramesOpen : SeleniumTestCaseBase
{
[Test]
public void ShouldBeAbleToOpenFrames()
{
selenium.Open("../tests/html/Frames.html");
selenium.SelectFrame("mainFrame");
Assert.IsTrue(Regex.IsMatch(selenium.GetLocation(), "^[\\s\\S]*/tests/html/test_open\\.html$"));
Assert.IsTrue(selenium.IsTextPresent("This is a test of the open command."));
selenium.Open("../tests/html/test_page.slow.html");
Assert.IsTrue(Regex.IsMatch(selenium.GetLocation(), "^[\\s\\S]*/tests/html/test_page\\.slow\\.html$"));
Assert.AreEqual("Slow Loading Page", selenium.GetTitle());
selenium.SetTimeout("5000");
selenium.Open("../tests/html/test_open.html");
selenium.Open("../tests/html/test_open.html");
selenium.Open("../tests/html/test_open.html");
}
}
}