<commit_before># FluentSelenium

Refer my [Fluent Selenium Examples Blog Entry](http://paulhammant.com/2013/05/19/fluent-selenium-examples) for an actual use.

## Basic Use

```java
WebDriver wd = new FirefoxDriver();
FluentWebDriver fwd = new FluentWebDriver(wd);

fwd.div(id("foo").div(className("bar").button().click();

fwd.span(id("results").getText().shouldBe("1 result");
```

## Situations where the DOM is changing slowly

```java
fwd.div(id("foo").div(className("bar").within(secs(5)).button().click();

String resultsText = fwd.span(id("results").within(millis(200)).getText().toString();
```
### Stale Elements

WebDriver, by default, does not handle findElement traversals from elements that have
gone stale transparently. It prefers to throw StaleElementReferenceException, which you<commit_msg>more words<commit_after># FluentSelenium

Refer my [Fluent Selenium Examples Blog Entry](http://paulhammant.com/2013/05/19/fluent-selenium-examples) for an actual use.

To use via Maven:

```xml
<dependency>
   <groupId>org.seleniumhq.selenium.fluent</groupId>
   <artifactId>fluent-selenium</artifactId>
   <version>1.8</version>
   <scope>test</scope>
</dependency>

<!-- you need to choose a hamcrest version that works for you too -->
<dependency>
   <groupId>org.hamcrest</groupId>
   <artifactId>hamcrest-all</artifactId>
   <version>1.3</version>
   <scope>test</scope>
</dependency>
```

For non Maven-Central build systems, [download it yourself](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22fluent-selenium%22)

## Basic Use

```java
WebDriver wd = new FirefoxDriver();
FluentWebDriver fwd = new FluentWebDriver(wd);

fwd.div(id("foo").div(className("bar").button().click();

fwd.span(id("results").getText().shouldBe("1 result");
```

## Situations where the DOM is changing slowly

```java
fwd.div(id("foo").div(className("bar").within(secs(5)).button().click();

String resultsText = fwd.span(id("results").within(millis(200)).getText().toString();
```
### Stale Elements

WebDriver, by default, does not handle findElement traversals from elements that have
gone stale transparently. It prefers to throw StaleElementReferenceException, which you
{'fraction_non_alphanumeric': 0.1592268752876208, 'fraction_numerical': 0.017947537965945698, 'mean_word_length': 5.990353697749196, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4453488', 'n_tokens_mistral': 759, 'n_tokens_neox': 689, 'n_words': 163}