Toppokki
- Package
- purescript-toppokki
- Repository
- justinwoo/purescript-toppokki
#ElementHandle Source
data ElementHandle :: Type
#LaunchOptions Source
type LaunchOptions = (args :: Array String, defaultViewport :: Record DefaultViewPort, devtools :: Boolean, dumpio :: Boolean, executablePath :: String, handleSIGHUP :: Boolean, handleSIGINT :: Boolean, handleSIGTERM :: Boolean, headless :: Boolean, ignoreDefaultArgs :: Array String, ignoreHTTPSErrors :: Boolean, pipe :: Boolean, slowMo :: Number, timeout :: Number, userDataDir :: String)
#screenshot Source
screenshot :: forall trash options. Union options trash ScreenshotOptions => Record options -> Page -> Aff Buffer
#PDFMarginOptions Source
type PDFMarginOptions = (bottom :: String, left :: String, right :: String, top :: String)
#makePDFMargin Source
makePDFMargin :: forall trash options. Union options trash PDFMarginOptions => Record options -> PDFMargin
#pageWaitForSelector Source
pageWaitForSelector :: forall trash options. Union options trash (hidden :: Boolean, timeout :: Int, visible :: Boolean) => Selector -> Record options -> Page -> Aff ElementHandle
#WaitUntilOption Source
data WaitUntilOption :: Type
#unsafeEvaluateOnNewDocument Source
unsafeEvaluateOnNewDocument :: String -> Page -> Aff Foreign
The function is invoked after the document was created but before any of its scripts were run.
This is useful to amend the environment, e.g. to seed Math.random.
#unsafePageEval Source
unsafePageEval :: Selector -> String -> Page -> Aff Foreign
This method runs document.querySelector within the page and passes it as the first argument to pageFunction. If there's no element matching selector, the method throws an error.
Second argument is a pageFunction which should be a valid JavaScript function written as a string which we unsafely eval.
If pageFunction returns a Promise, then page.$$eval would wait for the promise to resolve and return its value.
#unsafePageEvalAll Source
unsafePageEvalAll :: Selector -> String -> Page -> Aff Foreign
This method runs Array.from(document.querySelectorAll(selector)) within the page and passes it as the first argument to pageFunction.
Second argument is a pageFunction which should be a valid JavaScript function written as a string which we unsafely eval.
If pageFunction returns a Promise, then page.$$eval would wait for the promise to resolve and return its value.
#runPromiseAffE2 Source
runPromiseAffE2 :: forall o b a. Fn2 a b (Effect (Promise o)) -> a -> b -> Aff o
#runPromiseAffE3 Source
runPromiseAffE3 :: forall o c b a. Fn3 a b c (Effect (Promise o)) -> a -> b -> c -> Aff o
#runPromiseAffE4 Source
runPromiseAffE4 :: forall o d c b a. Fn4 a b c d (Effect (Promise o)) -> a -> b -> c -> d -> Aff o
#keyboardDown Source
keyboardDown :: forall trash options. Union options trash (text :: String) => KeyboardKey -> Record options -> Page -> Aff Unit
Dispatches a keydown event.
#keyboardPress Source
keyboardPress :: forall trash options. Union options trash (delay :: Int, text :: String) => KeyboardKey -> Record options -> Page -> Aff Unit
Trigger a single keypress. Shortcut for keyboard.down
and keyboard.up
.
#keyboardSendCharacter Source
keyboardSendCharacter :: String -> Page -> Aff Unit
Dispatches a keypress and input event. This does not send a keydown or keyup event.
#keyboardUp Source
keyboardUp :: forall trash options. Union options trash (text :: String) => KeyboardKey -> Record options -> Page -> Aff Unit
Dispatches a keyup event.
#_pageWaitForSelector Source
_pageWaitForSelector :: forall options. Fn3 Selector options Page (Effect (Promise ElementHandle))
#_keyboardDown Source
_keyboardDown :: forall options. Fn3 KeyboardKey options Page (Effect (Promise Unit))
#_keyboardPress Source
_keyboardPress :: forall options. Fn3 KeyboardKey options Page (Effect (Promise Unit))
#_keyboardUp Source
_keyboardUp :: forall options. Fn3 KeyboardKey options Page (Effect (Promise Unit))
- Modules
- Toppokki