diff --git a/README.md b/README.md index a44f4825..5a51824d 100644 --- a/README.md +++ b/README.md @@ -15,80 +15,90 @@ This UDF will allow you to interact with any browser that supports the [W3C WebD # Function List -## Core Functions - -- _WD_Action($sSession, $sCommand, $sOption = Default) -- _WD_Alert($sSession, $sCommand, $sOption = Default) -- _WD_Cookies($sSession, $sCommand, $sOption = Default) -- _WD_CreateSession($sDesiredCapabilities = Default) -- _WD_DeleteSession($sSession) -- _WD_ElementAction($sSession, $sElement, $sCommand, $sOption = Default) -- _WD_ExecuteScript($sSession, $sScript, $sArguments = Default, $bAsync = Default, $vSubNode = Default) -- _WD_FindElement($sSession, $sStrategy, $sSelector, $sStartNodeID = Default, $bMultiple = Default, $bShadowRoot = Default) -- _WD_GetSession($sSession) -- _WD_GetSource($sSession) -- _WD_Navigate($sSession, $sURL) -- _WD_Option($sOption, $vValue = Default) -- _WD_Shutdown($vDriver = Default) -- _WD_Startup() -- _WD_Status() -- _WD_Timeouts($sSession, $sTimeouts = Default) -- _WD_Window($sSession, $sCommand, $sOption = Default) - -## Helper Functions - -- _WD_Attach($sSession, $sString, $sMode = Default) -- _WD_ConsoleVisible($bVisible = Default) -- _WD_DownloadFile($sURL, $sDest, $iOptions = Default) -- _WD_ElementActionEx($sSession, $sElement, $sCommand, $iXOffset = Default, $iYOffset = Default, $iButton = Default, $iHoldDelay = Default, $sModifier = Default) -- _WD_ElementOptionSelect($sSession, $sStrategy, $sSelector, $sStartElement = Default) -- _WD_ElementSelectAction($sSession, $sSelectElement, $sCommand) -- _WD_FrameEnter($sSession, $vIdentifier) -- _WD_FrameLeave($sSession) -- _WD_GetMouseElement($sSession) -- _WD_GetElementFromPoint($sSession, $iX, $iY) -- _WD_GetBrowserVersion($sBrowser) -- _WD_GetWebDriverVersion($sInstallDir, $sDriverEXE) -- _WD_GetElementById($sSession, $sID) -- _WD_GetElementByName($sSession, $sName) -- _WD_GetTable($sSession, $sBaseElement) -- _WD_GetFrameCount($sSession) -- _WD_GetShadowRoot($sSession, $sStrategy, $sSelector, $sStartElement = Default) -- _WD_HighlightElement($sSession, $sElement, $iMethod = Default) -- _WD_HighlightElements($sSession, $aElements, $iMethod = Default) -- _WD_IsFullScreen($sSession) -- _WD_IsLatestRelease() -- _WD_IsWindowTop($sSession) -- _WD_jQuerify($sSession, $sjQueryFile = Default, $iTimeout = Default) -- _WD_LastHTTPResult() -- _WD_LinkClickByText($sSession, $sText, $bPartial = Default) -- _WD_LoadWait($sSession, $iDelay = Default, $iTimeout = Default, $sElement = Default) -- _WD_NewTab($sSession, $bSwitch = Default, $iTimeout = Default, $sURL = Default, $sFeatures = Default) -- _WD_PrintToPDF($sSession, $sOptions = Default) -- _WD_Screenshot($sSession, $sElement = Default, $nOutputType = Default) -- _WD_SelectFiles($sSession, $sStrategy, $sSelector, $sFilename) -- _WD_SetTimeouts($sSession, $iPageLoad = Default, $iScript = Default, $iImplicitWait = Default) -- _WD_SetElementValue($sSession, $sElement, $sValue, $iStyle = Default) -- _WD_UpdateDriver($sBrowser, $sInstallDir = Default, $bFlag64 = Default, $bForce = Default) -- _WD_WaitElement($sSession, $sStrategy, $sSelector, $iDelay = Default, $iTimeout = Default, $iOptions = Default) - -## CDP functions - -- _WD_CDPExecuteCommand($sSession, $sCommand, $oParams, $sWebSocketURL = Default) -- _WD_CDPGetSettings($sSession, $sOption) - -## Capabilities functions - -- _WD_CapabilitiesStartup() -- _WD_CapabilitiesAdd($key, $value1 = '', $value2 = '') -- _WD_CapabilitiesGet() -- _WD_CapabilitiesDump($s_Comment) -- _WD_CapabilitiesDisplay($s_Comment) +### Core Functions + +| Name | Description | +|-------------------|-----------------------------------------------------------| +| _WD_CreateSession | Request new session from web driver. | +| _WD_DeleteSession | Delete existing session. | +| _WD_Status | Get current web driver state. | +| _WD_GetSession | Get details on existing session. | +| _WD_Timeouts | Set or retrieve the session timeout parameters. | +| _WD_Navigate | Navigate to the designated URL. | +| _WD_Action | Perform various interactions with the web driver session. | +| _WD_Window | Perform interactions related to the current window. | +| _WD_FindElement | Find element(s) by designated strategy. | +| _WD_ElementAction | Perform action on desginated element. | +| _WD_ExecuteScript | Execute Javascipt commands. | +| _WD_Alert | Respond to user prompt. | +| _WD_GetSource | Get page source. | +| _WD_Cookies | Gets, sets, or deletes the session's cookies. | +| _WD_Option | Sets and get options for the web driver UDF. | +| _WD_Startup | Launch the designated web driver console app. | +| _WD_Shutdown | Kill the web driver console app. | + +### Helper Functions + +| Name | Description | +|-------------------------|----------------------------------------------------------------------------| +| _WD_NewTab | Create new tab in current browser session. | +| _WD_Attach | Attach to existing browser tab. | +| _WD_LinkClickByText | Simulate a mouse click on a link with text matching the provided string. | +| _WD_WaitElement | Wait for an element in the current tab before returning. | +| _WD_GetMouseElement | Retrieves reference to element below mouse pointer. | +| _WD_GetElementFromPoint | Retrieves reference to element at specified point. | +| _WD_LastHTTPResult | Return the result of the last WinHTTP request. | +| _WD_GetFrameCount | Returns the number of frames/iframes in the current document context. | +| _WD_IsWindowTop | Returns a boolean of the session being at the top level, or in a frame(s). | +| _WD_FrameEnter | Enter the specified frame. | +| _WD_FrameLeave | Leave the current frame, to its parent. | +| _WD_HighlightElement | Highlights the specified element. | +| _WD_HighlightElements | Highlights the specified elements. | +| _WD_LoadWait | Wait for a browser page load to complete before returning. | +| _WD_Screenshot | Takes a screenshot of the Window or Element. | +| _WD_PrintToPDF | Print the current tab in paginated PDF format. | +| _WD_jQuerify | Inject jQuery library into current session. | +| _WD_ElementOptionSelect | Find and click on an option from a Select element. | +| _WD_ElementSelectAction | Perform action on desginated Select element. | +| _WD_ConsoleVisible | Control visibility of the webdriver console app. | +| _WD_GetShadowRoot | Retrieves the shadow root of an element. | +| _WD_SelectFiles | Select files for uploading to a website. | +| _WD_IsLatestRelease | Compares local UDF version to latest release on Github. | +| _WD_UpdateDriver | Replace web driver with newer version, if available. | +| _WD_GetBrowserVersion | Get version number of specified browser. | +| _WD_GetWebDriverVersion | Get version number of specifed webdriver. | +| _WD_DownloadFile | Download file and save to disk. | +| _WD_SetTimeouts | User friendly function to set webdriver session timeouts. | +| _WD_GetElementById | Locate element by id. | +| _WD_GetElementByName | Locate element by name. | +| _WD_SetElementValue | Set value of designated element. | +| _WD_ElementActionEx | Perform advanced action on desginated element. | +| _WD_GetTable | Return all elements of a table. | +| _WD_IsFullScreen | Return a boolean indicating if the session is in full screen mode. | +| _WD_CheckContext | Check if browser context is still valid. | | + +### CDP functions + +| Name | Description | +|-------------------------|-----------------------------------------------------| +| _WD_CDPExecuteCommand | Execute CDP command. | +| _WD_CDPGetSettings | Retrieve CDP related settings from the browser. | + +### Capabilities functions + +| Name | Description | +|-------------------------|----------------------------------| +| _WD_CapabilitiesStartup | Start new Capabilities build | +| _WD_CapabilitiesAdd | Add capablitities to JSON string | +| _WD_CapabilitiesGet | Get the JSON string | +| _WD_CapabilitiesDump | Dump to console | +| _WD_CapabilitiesDisplay | Display the current content | ## Source Code You will always be able to find the latest version in the GitHub Repo https://github.com/Danp2/WebDriver ## Additional Resources + ### [Webdriver Wiki](https://www.autoitscript.com/wiki/WebDriver) ### Discussion Threads on Autoit Forums