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

Commit e1a0099

Browse files
committed
Removed waiter combinator
1 parent fdd54be commit e1a0099

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/Selenium/Combinators.purs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,6 @@ contra check = do
5959
(const $ pure unit)
6060
(const $ throwError $ error "check successed in contra") eR
6161

62-
-- | takes value and repeatedly tries to evaluate it for timeout of ms (second arg)
63-
-- | if it evaluates w/o error returns its value
64-
-- | else throws error
65-
waiter :: forall e o a. Selenium e o a -> Int -> Selenium e o a
66-
waiter getter timeout = do
67-
wait (checker $ (isRight <$> attempt getter)) timeout
68-
getter
69-
70-
waitExistentCss :: forall e o. String -> Int -> Selenium e o Element
71-
waitExistentCss css timeout =
72-
waiter (getElementByCss css) timeout
73-
74-
waitNotExistentCss :: forall e o. String -> Int -> Selenium e o Unit
75-
waitNotExistentCss css timeout =
76-
waiter (checkNotExistsByCss css) timeout
77-
78-
7962
-- | Repeatedly tries to evaluate check (third arg) for timeout ms (first arg)
8063
-- | finishes when check evaluates to true.
8164
-- | If there is an error during check or it constantly returns `false`
@@ -87,6 +70,5 @@ await timeout check = do
8770
Left _ -> throwError $ error "await has no success"
8871
Right _ -> pure unit
8972

90-
9173
awaitUrlChanged :: forall e o. String -> Selenium e o Boolean
9274
awaitUrlChanged oldURL = checker $ (oldURL /=) <$> getCurrentUrl

0 commit comments

Comments
 (0)