Skip to content
This repository was archived by the owner on Jan 17, 2020. It is now read-only.

combinators, spy-xhr, reader interface #15

Merged
merged 1 commit into from
Sep 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions docs/Selenium.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ affLocator \el -> do
foldFn a _ = a
```

#### `findExact`

``` purescript
findExact :: forall e. Driver -> Locator -> Aff (selenium :: SELENIUM | e) Element
```

#### `childExact`

``` purescript
childExact :: forall e. Element -> Locator -> Aff (selenium :: SELENIUM | e) Element
```

#### `findElement`

``` purescript
Expand Down Expand Up @@ -109,7 +121,7 @@ Same as `findElements` but starts searching from custom element
#### `setFileDetector`

``` purescript
setFileDetector :: forall e. Driver -> FileDetector -> Eff (selenium :: SELENIUM | e) Unit
setFileDetector :: forall e. Driver -> FileDetector -> Aff (selenium :: SELENIUM | e) Unit
```

#### `navigateBack`
Expand All @@ -130,10 +142,10 @@ navigateForward :: forall e. Driver -> Aff (selenium :: SELENIUM | e) Unit
refresh :: forall e. Driver -> Aff (selenium :: SELENIUM | e) Unit
```

#### `to`
#### `navigateTo`

``` purescript
to :: forall e. String -> Driver -> Aff (selenium :: SELENIUM | e) Unit
navigateTo :: forall e. String -> Driver -> Aff (selenium :: SELENIUM | e) Unit
```

#### `getCurrentUrl`
Expand Down
88 changes: 88 additions & 0 deletions docs/Selenium/Combinators.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
## Module Selenium.Combinators

#### `retry`

``` purescript
retry :: forall e o a. Int -> Selenium e o a -> Selenium e o a
```

Retry computation until it successed but not more then `n` times

#### `tryFind`

``` purescript
tryFind :: forall e o. String -> Selenium e o Element
```

Tries to find element by string checks: css, xpath, id, name and classname

#### `waitUntilJust`

``` purescript
waitUntilJust :: forall e o a. Selenium e o (Maybe a) -> Int -> Selenium e o a
```

#### `checker`

``` purescript
checker :: forall e o a. Selenium e o Boolean -> Selenium e o Boolean
```

#### `getElementByCss`

``` purescript
getElementByCss :: forall e o. String -> Selenium e o Element
```

#### `checkNotExistsByCss`

``` purescript
checkNotExistsByCss :: forall e o. String -> Selenium e o Unit
```

#### `contra`

``` purescript
contra :: forall e o a. Selenium e o a -> Selenium e o Unit
```

#### `waiter`

``` purescript
waiter :: forall e o a. Selenium e o a -> Int -> Selenium e o a
```

takes value and repeatedly tries to evaluate it for timeout of ms (second arg)
if it evaluates w/o error returns its value
else throws error

#### `waitExistentCss`

``` purescript
waitExistentCss :: forall e o. String -> Int -> Selenium e o Element
```

#### `waitNotExistentCss`

``` purescript
waitNotExistentCss :: forall e o. String -> Int -> Selenium e o Unit
```

#### `await`

``` purescript
await :: forall e o. Int -> Selenium e o Boolean -> Selenium e o Unit
```

Repeatedly tries to evaluate check (third arg) for timeout ms (first arg)
finishes when check evaluates to true.
If there is an error during check or it constantly returns `false`
throws error with message (second arg)

#### `awaitUrlChanged`

``` purescript
awaitUrlChanged :: forall e o. String -> Selenium e o Boolean
```


Loading