git.iko.soy/rowtype-yoga/purescript-lunapark
on main help sign in
added a variant of posting
commitc826d390cbd2a53810b8fc22a5faa894d7432e72 authorMaxim Zimaliev <zimaliev@gmail.com> dateThu 1 Aug 2019, 18:21 (7 years ago) parent1fb7ef4
1 file changed+12−3
src/Lunapark/API.purs+12−3
src/Lunapark/API.purs+12−3
@@ -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