forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTestOpenInTargetFrame.cs
29 lines (28 loc) · 1.03 KB
/
TestOpenInTargetFrame.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
29
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using System.Text.RegularExpressions;
using System.Threading;
namespace Selenium.Tests
{
[TestFixture]
public class TestOpenInTargetFrame : SeleniumTestCaseBase
{
[Test]
public void ShouldBeAbleToOpenInTargetFrame()
{
selenium.Open("../tests/html/test_open_in_target_frame.html");
selenium.SelectFrame("rightFrame");
selenium.Click("link=Show new frame in leftFrame");
// we are forced to do a pause instead of clickandwait here,
// for currently we can not detect target frame loading in ie yet
Thread.Sleep(1500);
Assert.IsTrue(selenium.IsTextPresent("Show new frame in leftFrame"));
selenium.SelectFrame("relative=top");
selenium.SelectFrame("leftFrame");
Assert.IsTrue(selenium.IsTextPresent("content loaded"));
Assert.IsFalse(selenium.IsTextPresent("This is frame LEFT"));
}
}
}