#lang scheme

; List of Selenium commands, their arities and return types.
; Used in api.ss to define and provide a suite of proper Scheme functions.
(define api-commands
  '(;(start 2 void) - this one needs to be defined manually
    (stop 0 void)
    (click 1 void)
    (doubleClick 1 void)
    (contextMenu 1 void)
    (clickAt 2 void)
    (doubleClickAt 2 void)
    (contextMenuAt 2 void)
    (fireEvent 2 void)
    (focus 1 void)
    (keyPress 2 void)
    (shiftKeyDown 0 void)
    (shiftKeyUp 0 void)
    (metaKeyDown 0 void)
    (metaKeyUp 0 void)
    (altKeyDown 0 void)
    (altKeyUp 0 void)
    (controlKeyDown 0 void)
    (controlKeyUp 0 void)
    (keyDown 2 void)
    (keyUp 2 void)
    (mouseOver 1 void)
    (mouseOut 1 void)
    (mouseDown 1 void)
    (mouseDownRight 1 void)
    (mouseDownAt 2 void)
    (mouseDownRightAt 2 void)
    (mouseUp 1 void)
    (mouseUpRight 1 void)
    (mouseUpAt 2 void)
    (mouseUpRightAt 2 void)
    (mouseMove 1 void)
    (mouseMoveAt 2 void)
    (type 2 void)
    (typeKeys 2 void)
    (setSpeed 1 void)
    (getSpeed 0 number)
    (check 1 void)
    (uncheck 1 void)
    (select 2 void)
    (addSelection 2 void)
    (removeSelection 2 void)
    (removeAllSelections 1 void)
    (submit 1 void)
    (open 1 void)
    (openWindow 2 void)
    (selectWindow 1 void)
    (selectPopUp 1 void)
    (deselectPopUp 0 void)
    (selectFrame 1 void)
    (getWhetherThisFrameMatchFrameExpression 2 boolean)
    (getWhetherThisWindowMatchWindowExpression 2 boolean)
    (waitForPopUp 2 void)
    (chooseCancelOnNextConfirmation 0 void)
    (chooseOkOnNextConfirmation 0 void)
    (answerOnNextPrompt 1 void)
    (goBack 0 void)
    (refresh 0 void)
    (close 0 void)
    (isAlertPresent 0 boolean)
    (isPromptPresent 0 boolean)
    (isConfirmationPresent 0 boolean)
    (getAlert 0 string)
    (getConfirmation 0 string)
    (getPrompt 0 string)
    (getLocation 0 string)
    (getTitle 0 string)
    (getBodyText 0 string)
    (getValue 1 string)
    (getText 1 string)
    (highlight 1 void)
    (getEval 1 string)
    (isChecked 1 boolean)
    (getTable 1 string)
    (getSelectedLabels 1 string-list)
    (getSelectedLabel 1 string)
    (getSelectedValues 1 string-list)
    (getSelectedValue 1 string)
    (getSelectedIndexes 1 string-list)
    (getSelectedIndex 1 string)
    (getSelectedIds 1 string-list)
    (getSelectedId 1 string)
    (isSomethingSelected 1 boolean)
    (getSelectOptions 1 string-list)
    (getAttribute 1 string)
    (isTextPresent 1 boolean)
    (isElementPresent 1 boolean)
    (isVisible 1 boolean)
    (isEditable 1 boolean)
    (getAllButtons 0 string-list)
    (getAllLinks 0 string-list)
    (getAllFields 0 string-list)
    (getAttributeFromAllWindows 1 string-list)
    (dragdrop 2 void)
    (setMouseSpeed 1 void)
    (getMouseSpeed 0 number)
    (dragAndDrop 2 void)
    (dragAndDropToObject 2 void)
    (windowFocus 0 void)
    (windowMaximize 0 void)
    (getAllWindowIds 0 string-list)
    (getAllWindowNames 0 string-list)
    (getAllWindowTitles 0 string-list)
    (getHtmlSource 0 string)
    (setCursorPosition 2 void)
    (getElementIndex 1 number)
    (isOrdered 2 boolean)
    (getElementPositionLeft 1 number)
    (getElementPositionTop 1 number)
    (getElementWidth 1 number)
    (getElementHeight 1 number)
    (getCursorPosition 1 number)
    (getExpression 1 string)
    (getXpathCount 1 number)
    (assignId 2 void)
    (allowNativeXpath 1 void)
    (ignoreAttributesWithoutValue 1 void)
    (waitForCondition 2 void)
    (setTimeout 1 void)
    (waitForPageToLoad 1 void)
    (waitForFrameToLoad 2 void)
    (getCookie 0 string)
    (getCookieByName 1 string)
    (isCookiePresent 1 boolean)
    (createCookie 2 void)
    (deleteCookie 2 void)
    (deleteAllVisibleCookies 0 void)
    (setBrowserLogLevel 1 void)
    (runScript 1 void)
    (addLocationStrategy 2 void)
    (captureEntirePageScreenshot 2 void)
    (rollup 2 void)
    (addScript 2 void)
    (removeScript 1 void)
    (useXpathLibrary 1 void)
    (setContext 1 void)
    (attachFile 2 void)
    (captureScreenshot 1 void)
    (captureScreenshotToString 0 base64)
    (captureEntirePageScreenshotToString 1 string)
    (shutDownSeleniumServer 0 void)
    (retrieveLastRemoteControlLogs 0 string)
    (keyDownNative 1 void)
    (keyUpNative 1 void)
    (keyPressNative 1 void)))

; Provides ---------------------------------------

(provide api-commands)