Tag Info

Hot answers tagged

4

You can create an Even listener: EventListeners (NUnit 2.4.4) Interface The extension object passed to Install must implement the EventListener interface: public interface EventListener { void RunStarted( string name, int testCount ); void RunFinished( TestResult result ); void RunFinished( Exception exception ); void ...


4

How Selenium determines whether an element exists and how it behaves when an element is not found seems to vary from one release to the next. With the current release, it is possible to finesse the problem by switching to the findElements method. For example, in Java I would do something like this: elements = driver.findElements(By.id(Element_ID")); if ...


1

The EventListener is the way to go. However there is a knack: the UnhandledException will not be fired when an Assertion in your test fails. Rather use the TestFinished event to handle failed tests: public void TestFinished(TestResult result) { if (result.Executed && result.IsFailure) { Console.WriteLine(string.Format("Failure in ...


1

My guess is that your element is not present. the Click() method using the Firefox driver doesn't work like ClickAndWait in the Selenium IDE. You must explicitly do an implicit wait before you click on something. My guess is that you had 2 clicks right in a row, and it's failing on the second click because that element doesn't exist yet, because the first ...



Only top voted, non community-wiki answers of a minimum length are eligible