Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.

Commit 3e02612

Browse files
authored
Merge pull request #10 from slamdata/fix/chrome75
added a variant of posting
2 parents 1fb7ef4 + c826d39 commit 3e02612

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/Lunapark/API.purs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,16 @@ handleLunapark inp = case _ of
494494
res ← get (inSession : inElement : LP.Enabled : Nil)
495495
map cont $ throwLeft $ J.decodeJson res
496496
ClickEl next → do
497-
_ ← post_ (inSession : inElement : LP.Click : Nil)
497+
_ ← tryAndCache "chromedriver75 update clickElement"
498+
[ post_ (inSession : inElement : LP.Click : Nil)
499+
, post (inSession : inElement : LP.Click : Nil) $ LT.encodeElement el
500+
]
498501
pure next
499502
ClearEl next → do
500-
_ ← post_ (inSession : inElement : LP.Clear : Nil)
503+
_ ← tryAndCache "chromedriver75 update clearElement"
504+
[ post_ (inSession : inElement : LP.Clear : Nil)
505+
, post (inSession : inElement : LP.Click : Nil) $ LT.encodeElement el
506+
]
501507
pure next
502508
SendKeysEl txt next → do
503509
_ ← tryAndCache "send keys chromedriver hack"
@@ -517,7 +523,10 @@ handleLunapark inp = case _ of
517523
]
518524
map cont $ throwLeft $ J.decodeJson res
519525
Submit next → do
520-
_ ← post_ (inSession : inElement : LP.Submit : Nil)
526+
_ ← tryAndCache "chromedriver75 update submit form"
527+
[ post_ (inSession : inElement : LP.Submit : Nil)
528+
, post (inSession: inElement : LP.Submit : Nil) $ LT.encodeElement el
529+
]
521530
pure next
522531

523532
where

0 commit comments

Comments
 (0)