blob: 7da507f8702dcb68a41a27eb9e851fae8d845f82 [file] [log] [blame]
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using System.Text.RegularExpressions;
namespace Selenium.Tests
{
[TestFixture]
public class TestCommandError : SeleniumTestCaseBase
{
[Test]
public void CommandError()
{
selenium.Open("../tests/html/test_verifications.html");
try
{
selenium.Click("notALink"); Assert.Fail("expected failure");
}
catch (Exception) { }
try
{
selenium.Select("noSuchSelect", "somelabel"); Assert.Fail("expected failure");
}
catch (Exception) { }
try
{
selenium.Select("theSelect", "label=noSuchLabel"); Assert.Fail("expected failure");
}
catch (Exception) { }
try
{
selenium.Select("theText", "label=noSuchLabel"); Assert.Fail("expected failure");
}
catch (Exception) { }
}
}
}