@@ -32,6 +32,11 @@ module Playwright
3232 , waitForRequest
3333 , waitForResponse
3434 , waitForSelector
35+ , waitForFunction
36+ , waitForLoadState
37+ , waitForTimeout
38+ , pdf
39+ , setInputFiles
3540 , module Playwright.Data
3641 , module Playwright.Options
3742 )
@@ -82,24 +87,21 @@ newPage
8287 => Coercible o NewpageOptions
8388 => x -> o -> Aff Page
8489newPage =
85− affCall "newPage" typeInfo
86− where typeInfo _ = newPage
90+ affCall "newPage" \_ -> newPage
8791
8892goForward
8993 :: forall o
9094 . Coercible o GoOptions
9195 => Page -> o -> Aff (Null |+| Response)
9296goForward =
93− affCall "goForward" typeInfo
94− where typeInfo _ = goForward
97+ affCall "goForward" \_ -> goForward
9598
9699goBack
97100 :: forall o
98101 . Coercible o GoOptions
99102 => Page -> o -> Aff (Null |+| Response)
100103goBack =
101− affCall "goBack" typeInfo
102− where typeInfo _ = goBack
104+ affCall "goBack" \_ -> goBack
103105
104106goto
105107 :: forall x o
@@ -107,8 +109,7 @@ goto
107109 => Coercible o GotoOptions
108110 => x -> URL -> o -> Aff (Null |+| Response)
109111goto =
110− affCall "goto" typeInfo
111− where typeInfo _ = goto
112+ affCall "goto" \_ -> goto
112113
113114type Cookie =
114115 { name :: String
@@ -304,3 +305,64 @@ waitForSelector
304305 -> o
305306 -> Aff (Null |+| ElementHandle)
306307waitForSelector = affCall "waitForSelector" \_ -> waitForSelector
308+
309+waitForFunction
310+ :: forall x o
311+ . Coercible x (Page |+| Frame)
312+ => Coercible o WaitForFunctionOptions
313+ => x
314+ -> String
315+ -- ^ Function to be evaluated in browser context
316+ -> EvaluationArgument
317+ -> o
318+ -> Aff JSHandle
319+waitForFunction = affCall "waitForFunction" \_ -> waitForFunction
320+
321+waitForLoadState
322+ :: forall x o
323+ . Coercible x (Page |+| Frame)
324+ => Coercible o WaitForLoadStateOptions
325+ => x
326+ -> WaitUntil
327+ -> o
328+ -> Aff Unit
329+waitForLoadState = affCall "waitForLoadState" \_ -> waitForLoadState
330+
331+waitForTimeout
332+ :: forall x
333+ . Coercible x (Page |+| Frame)
334+ => x
335+ -> Int
336+ -> Aff Unit
337+waitForTimeout = affCall "waitForTimeout" \_ -> waitForTimeout
338+
339+pdf
340+ :: forall o
341+ . Coercible o PdfOptions
342+ => Page
343+ -> o
344+ -> Aff Buffer
345+pdf = affCall "pdf" \_ -> pdf
346+
347+setInputFiles
348+ :: forall x o f
349+ . Coercible x (Page |+| Frame |+| ElementHandle)
350+ => Coercible o SetInputFilesOptions
351+ => Coercible f
352+ ( String
353+ |+| Array String
354+ |+| { name :: String
355+ , mimeType :: String
356+ , buffer :: Buffer
357+ }
358+ |+| Array { name :: String
359+ , mimeType :: String
360+ , buffer :: Buffer
361+ }
362+ )
363+ => x
364+ -> Selector
365+ -> f
366+ -> o
367+ -> Aff Unit
368+setInputFiles = affCall "setInputFiles" \_ -> setInputFiles