1<?php 2 3namespace Facebook\WebDriver\Remote; 4 5/** 6 * This list of command defined in the WebDriver json wire protocol. 7 * 8 * @codeCoverageIgnore 9 */ 10class DriverCommand 11{ 12 const GET_ALL_SESSIONS = 'getAllSessions'; 13 const GET_CAPABILITIES = 'getCapabilities'; 14 const NEW_SESSION = 'newSession'; 15 const STATUS = 'status'; 16 const CLOSE = 'close'; 17 const QUIT = 'quit'; 18 const GET = 'get'; 19 const GO_BACK = 'goBack'; 20 const GO_FORWARD = 'goForward'; 21 const REFRESH = 'refresh'; 22 const ADD_COOKIE = 'addCookie'; 23 const GET_ALL_COOKIES = 'getCookies'; 24 const DELETE_COOKIE = 'deleteCookie'; 25 const DELETE_ALL_COOKIES = 'deleteAllCookies'; 26 const FIND_ELEMENT = 'findElement'; 27 const FIND_ELEMENTS = 'findElements'; 28 const FIND_CHILD_ELEMENT = 'findChildElement'; 29 const FIND_CHILD_ELEMENTS = 'findChildElements'; 30 const CLEAR_ELEMENT = 'clearElement'; 31 const CLICK_ELEMENT = 'clickElement'; 32 const SEND_KEYS_TO_ELEMENT = 'sendKeysToElement'; 33 const SEND_KEYS_TO_ACTIVE_ELEMENT = 'sendKeysToActiveElement'; 34 const SUBMIT_ELEMENT = 'submitElement'; 35 const UPLOAD_FILE = 'uploadFile'; 36 const GET_CURRENT_WINDOW_HANDLE = 'getCurrentWindowHandle'; 37 const GET_WINDOW_HANDLES = 'getWindowHandles'; 38 const GET_CURRENT_CONTEXT_HANDLE = 'getCurrentContextHandle'; 39 const GET_CONTEXT_HANDLES = 'getContextHandles'; 40 // Switching between to window/frame/iframe 41 const SWITCH_TO_WINDOW = 'switchToWindow'; 42 const SWITCH_TO_CONTEXT = 'switchToContext'; 43 const SWITCH_TO_FRAME = 'switchToFrame'; 44 const SWITCH_TO_PARENT_FRAME = 'switchToParentFrame'; 45 const GET_ACTIVE_ELEMENT = 'getActiveElement'; 46 // Information of the page 47 const GET_CURRENT_URL = 'getCurrentUrl'; 48 const GET_PAGE_SOURCE = 'getPageSource'; 49 const GET_TITLE = 'getTitle'; 50 // Javascript API 51 const EXECUTE_SCRIPT = 'executeScript'; 52 const EXECUTE_ASYNC_SCRIPT = 'executeAsyncScript'; 53 // API getting information from an element. 54 const GET_ELEMENT_TEXT = 'getElementText'; 55 const GET_ELEMENT_TAG_NAME = 'getElementTagName'; 56 const IS_ELEMENT_SELECTED = 'isElementSelected'; 57 const IS_ELEMENT_ENABLED = 'isElementEnabled'; 58 const IS_ELEMENT_DISPLAYED = 'isElementDisplayed'; 59 const GET_ELEMENT_LOCATION = 'getElementLocation'; 60 const GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW = 'getElementLocationOnceScrolledIntoView'; 61 const GET_ELEMENT_SIZE = 'getElementSize'; 62 const GET_ELEMENT_ATTRIBUTE = 'getElementAttribute'; 63 const GET_ELEMENT_VALUE_OF_CSS_PROPERTY = 'getElementValueOfCssProperty'; 64 const ELEMENT_EQUALS = 'elementEquals'; 65 const SCREENSHOT = 'screenshot'; 66 // Alert API 67 const ACCEPT_ALERT = 'acceptAlert'; 68 const DISMISS_ALERT = 'dismissAlert'; 69 const GET_ALERT_TEXT = 'getAlertText'; 70 const SET_ALERT_VALUE = 'setAlertValue'; 71 // Timeout API 72 const SET_TIMEOUT = 'setTimeout'; 73 const IMPLICITLY_WAIT = 'implicitlyWait'; 74 const SET_SCRIPT_TIMEOUT = 'setScriptTimeout'; 75 /** @deprecated */ 76 const EXECUTE_SQL = 'executeSQL'; 77 const GET_LOCATION = 'getLocation'; 78 const SET_LOCATION = 'setLocation'; 79 const GET_APP_CACHE = 'getAppCache'; 80 const GET_APP_CACHE_STATUS = 'getStatus'; 81 const CLEAR_APP_CACHE = 'clearAppCache'; 82 const IS_BROWSER_ONLINE = 'isBrowserOnline'; 83 const SET_BROWSER_ONLINE = 'setBrowserOnline'; 84 // Local storage 85 const GET_LOCAL_STORAGE_ITEM = 'getLocalStorageItem'; 86 const GET_LOCAL_STORAGE_KEYS = 'getLocalStorageKeys'; 87 const SET_LOCAL_STORAGE_ITEM = 'setLocalStorageItem'; 88 const REMOVE_LOCAL_STORAGE_ITEM = 'removeLocalStorageItem'; 89 const CLEAR_LOCAL_STORAGE = 'clearLocalStorage'; 90 const GET_LOCAL_STORAGE_SIZE = 'getLocalStorageSize'; 91 // Session storage 92 const GET_SESSION_STORAGE_ITEM = 'getSessionStorageItem'; 93 const GET_SESSION_STORAGE_KEYS = 'getSessionStorageKey'; 94 const SET_SESSION_STORAGE_ITEM = 'setSessionStorageItem'; 95 const REMOVE_SESSION_STORAGE_ITEM = 'removeSessionStorageItem'; 96 const CLEAR_SESSION_STORAGE = 'clearSessionStorage'; 97 const GET_SESSION_STORAGE_SIZE = 'getSessionStorageSize'; 98 // Screen orientation 99 const SET_SCREEN_ORIENTATION = 'setScreenOrientation'; 100 const GET_SCREEN_ORIENTATION = 'getScreenOrientation'; 101 // These belong to the Advanced user interactions - an element is optional for these commands. 102 const CLICK = 'mouseClick'; 103 const DOUBLE_CLICK = 'mouseDoubleClick'; 104 const MOUSE_DOWN = 'mouseButtonDown'; 105 const MOUSE_UP = 'mouseButtonUp'; 106 const MOVE_TO = 'mouseMoveTo'; 107 // Those allow interactions with the Input Methods installed on the system. 108 const IME_GET_AVAILABLE_ENGINES = 'imeGetAvailableEngines'; 109 const IME_GET_ACTIVE_ENGINE = 'imeGetActiveEngine'; 110 const IME_IS_ACTIVATED = 'imeIsActivated'; 111 const IME_DEACTIVATE = 'imeDeactivate'; 112 const IME_ACTIVATE_ENGINE = 'imeActivateEngine'; 113 // These belong to the Advanced Touch API 114 const TOUCH_SINGLE_TAP = 'touchSingleTap'; 115 const TOUCH_DOWN = 'touchDown'; 116 const TOUCH_UP = 'touchUp'; 117 const TOUCH_MOVE = 'touchMove'; 118 const TOUCH_SCROLL = 'touchScroll'; 119 const TOUCH_DOUBLE_TAP = 'touchDoubleTap'; 120 const TOUCH_LONG_PRESS = 'touchLongPress'; 121 const TOUCH_FLICK = 'touchFlick'; 122 // Window API (beta) 123 const SET_WINDOW_SIZE = 'setWindowSize'; 124 const SET_WINDOW_POSITION = 'setWindowPosition'; 125 const GET_WINDOW_SIZE = 'getWindowSize'; 126 const GET_WINDOW_POSITION = 'getWindowPosition'; 127 const MAXIMIZE_WINDOW = 'maximizeWindow'; 128 const FULLSCREEN_WINDOW = 'fullscreenWindow'; 129 // Logging API 130 const GET_AVAILABLE_LOG_TYPES = 'getAvailableLogTypes'; 131 const GET_LOG = 'getLog'; 132 const GET_SESSION_LOGS = 'getSessionLogs'; 133 // Mobile API 134 const GET_NETWORK_CONNECTION = 'getNetworkConnection'; 135 const SET_NETWORK_CONNECTION = 'setNetworkConnection'; 136 // Custom command 137 const CUSTOM_COMMAND = 'customCommand'; 138 139 // W3C specific 140 const ACTIONS = 'actions'; 141 const GET_ELEMENT_PROPERTY = 'getElementProperty'; 142 const GET_NAMED_COOKIE = 'getNamedCookie'; 143 const NEW_WINDOW = 'newWindow'; 144 const TAKE_ELEMENT_SCREENSHOT = 'takeElementScreenshot'; 145 const MINIMIZE_WINDOW = 'minimizeWindow'; 146 147 private function __construct() 148 { 149 } 150} 151