From 86bfb71d981383978879c527f49f1f170636e6f7 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Wed, 23 Jun 2021 18:56:06 +1200 Subject: [PATCH] Add WebDriver noops for frames. --- src/Webdriver.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Webdriver.hs b/src/Webdriver.hs index 01e76dc..fe7b174 100644 --- a/src/Webdriver.hs +++ b/src/Webdriver.hs @@ -46,7 +46,8 @@ serveSession sessions = WD.withSession fail (\uuid session -> msum [ delSession sessions uuid, -- Closing the only window closes the session. switchWindowHandle uuid, dir "handles" $ getWindowHandles uuid - ] + ], + dir "frame" $ msum [noSuchFrame, dir "parent" $ ok $ toResponse ()] -- Noops ]) sessions where fail uuid'| Just _ <- ID.fromString uuid' = errJSON 404 "invalid session ID" $ ( @@ -148,4 +149,7 @@ getWindowHandles uuid = do nullDir okJSON ["window-" ++ ID.toString uuid] - +noSuchFrame = do + method POST + nullDir + errJSON 404 "no such frame" "Rhapsode doesn't support frames" -- 2.30.2