Most of the methods in the Coypu DSL are automatically retried on any driver error until a configurable timeout is reached. It just catches exceptions and retries -- mainly the Coypu.Drivers.MissingHtmlException that a driver should throw when it cannot find something, but also any internal driver errors that the driver might throw up.

Just to clarify, it was in the woods that begin as you walk towards Arlesford, past the sailing club. About 20m in there is a dew pond on the lefthandside, which is overgrown with brambles and hedging. I heard a rustling and looked to see something, no more than 5m away, down on top of what looked like pile of branches in the water. The animal looked straight at me, it was brown with a longish coat. It was at this point I turned around and went.

If no exact match is found Coypu will consider windows were the title contains the supplied value

Switching between frames and windows is a particular pain in WebDriver as you may well know. Check out this example of how Coypu handles windows from a Coypu acceptance test:

You can run the headless HtmlUnit driver for Selenium on windows too, you just need to run up HtmlUnit in java:

It didn’t help the debate that there were just so many myths and half-truths floating around. The coypus’ habit of growling when cornered (plus those orange incisors) led to some people fearing they would soon ‘attack’ Broads boating parties. J M Last of Corpusty had to write in in 1960 - you can almost hear him sighing as he put pen to paper – to point out that “coypus do not lurk in banks and hedges to leap upon passing cyclists.”

Coypus were introduced to the Louisiana ecosystem in the 1930s, when they escaped from fur farms that had imported them from South America. Nutria first came to Louisiana from South America in 1937, when E. A. McIlhenny brought 13 of them to Avery Island.[28] In 1940, some of the nutria escaped during a hurricane and quickly populated coastal marshes, inland swamps, and other wetland areas.[29] From Louisiana, coypus have spread across the Southern United States, wreaking havoc on marshland.

With a war on, people had much more on their plates to deal with that this additional to the local fauna, although the animals’ ‘voracious vegetarianism’ was being noted by 1943. The following year came the first complaints about them: that they were damaging reed beds.

You will need the chromedriver.exe on your PATH or in the bin of your test project. Download from google code

For their numbers were increasing – fast. Like herbivores the world over, their principal survival mechanism is to out-breed their predators. Maturing after eight months, coypu can breed five times in two years, with up to nine young in each litter.

All methods in the DSL take an optional final parameter of a Coypu.Options. By passing this in you can override any of these timing settings for just that call:

Coypu.Drivers.Selenium.SeleniumWebDriver tracks the latest version of WebDriver and supports Firefox, IE (slowest) and Chrome (Fastest) as the browser. Any other Selenium implementation of RemoteWebDriver can be configured by subclassing SeleniumWebDriver and passing an instance of RemoteWebDriver to the base constructor.

You can do this by creating your own driver that derives from Coypu.Drivers.Selenium.SeleniumWebDriver using something like this:

By 1945 Mr H W Palmer, Pests Officer to Norfolk War Agricultural Executive Committee, was saying: “We have trapped and killed hundreds, especially in the Cringleford and Broads areas. They have become a feature of our fauna.”

In fact, with a bit of poetic licence, it could be presented as something rather fearsome, which explains why it was exhibited at the Great Yarmouth Easter Fair in 1935 as the ‘giant sewer rat’, accompanied by a rather lurid painting of two sewer workers fending it off with shovels.

or constructing the Driver yourself and passing in your own Driver instance:

N.B. If you drop down into the native Selenium driver and use SwitchTo() (highly unrecommended), bypassing Coypu's FindWindow(), Coypu will lose track of the current window, so make sure to switch back to the previous window before dropping back to Coypu.

TextPrecision.Exact will only match the entire text of an element exactly.

If you have a complaint about a comment please contact us by clicking on the Report This Comment button next to the comment.

When you pass a custom driver, the Driver and Browser settings in ConfigurationSettings are ignored

Waits are as for the other Has/HasNo methods.

This is far from ideal as you are coupling the click to the expected result rather than verifying what you expect in a separate step, but as a last resort we have found this useful.

So in the above example, it doesn't matter what happens between clicking 'Find' and the search results loading. The search results area could be ripped out of the DOM and refreshed, there could be a full page refresh, or even a pop up window closed and reopened, so long as the session remains active.

Looking back on my memories of the 1960s and 1970s, it seemed to me that almost every edition of About Anglia or Look East had a coypu story on it. Of course, it could not really have been that way - but what was certain was this was definitely a story which ran and ran and ran...

Sometimes you just can't predict what state the browser will be in. Not ideal for a reliable test, but if it's unavoidable then you can use the Session.FindState like this:

If there's something you need that's not part of the DSL then please you may need to dive into the native driver which you can always do by casting the native driver to whatever underlying driver you know you are using:

If you are using SpecFlow for your acceptance tests then you will probably want to configure it to provide a single Browser Session scoped to each scenario. SpecFlow supports some basic dependency injection which you can use to achieve this as shown in this gist.

It all began with a dodgy fence, and a would-be fur magnate with a name straight out of P G Wodehouse.

Coypu

Match.Single if there is more than one matching element a Coypu.AmbiguousException is thrown. This is the default for Match

Here are some examples to get you started using Coypu

The last way to click is to pass an element you have already found directly to Click():

Coypu drivers implement the Coypu.Driver interface and read the SessionConfiguration.Browser setting to pick the correct browser.

“What puzzles us,” wondered Mrs L G Hudson, of Front Street, “is how it got there in the first place and managed to lock itself in.”

If you really need this for some intractable problem where you cannot control the browser without cheating like this, then there is sessionConfiguration/options.ConsideringInvisibleElements = true which overrides this restriction.

To send a link to this page you must be logged in.

Click any other element by calling the Click method on the returned ElementScope:

• Coming next week: A war declared - and won. But what if it happened today?

In XPath the expression // means something very specific, and it might not be what you think. Contrary to common belief, // means "anywhere in the document" not "anywhere in the current context". As an example:

Hi Darren, am really sure it was not a deer. It had extremely large front teeth, that's why I was so convinced I had seen a beaver. I have never seen an animal like this, the only thing close would be a rat; but if this is a rat, then i'm leaving Essex. It was enormous! bigger than my dog who is about 6kg.

If the driver reports it had found and clicked your element successfully but nothing happens then it may simply be that your app isn't wiring up events at the right time. But if you have exhausted this angle and cannot fix the problem in the site itself, then you could try a couple of things: