; #FUNCTION# ;=============================================================================== ; ; Name...........: _ChromeLoadURL() ; Description ...: Load a URL web page based. ; Syntax.........: _ChromeLoadURL($url, $timeout = 5) ; Parameters ....: $url - the URL to load ; $timeout - Optional: a number of minutes before exiting the function. ; Return values .: On Success - Returns "". ; On Failure - Returns "", and sets @ERROR = 2. ; Author ........: seangriffin ; Modified.......: ; Remarks .......: A prerequisite is that the Chrome browser is open ; (Window title = "[REGEXPTITLE:.*- Google Chrome]"). ; ; Related .......: ; Link ..........: ; Example .......: Yes ; ; ;========================================================================================== Func _ChromeLoadURL($url, $timeout = 30) Dim $response = "" $response = Chrome_Eval("Chrome_LoadURL=" & $url, $timeout) SetError(@error) Return $response EndFunc ; #FUNCTION# ;=============================================================================== ; ; Name...........: _ChromeInputClickByID() ; Description ...: Clicks an element based on it's "ID" attribute. ; Syntax.........: _ChromeInputClickByID($objid, $timeout = 5) ; Parameters ....: $objid - the value of the "name" attribute ; $timeout - Optional: a number of minutes before exiting the function. ; Return values .: On Success - Returns "". ; On Failure - Returns "", and sets @ERROR = 2. ; Author ........: seangriffin ; Modified.......: ; Remarks .......: A prerequisite is that the Chrome browser is open ; (Window title = "[REGEXPTITLE:.*- Google Chrome]"). ; ; Related .......: ; Link ..........: ; Example .......: Yes ; ; ;========================================================================================== Func _ChromeInputClickByID($objid, $timeout = 5) dim $response = "" $response = _ChromeEval("document.getElementByID('" & $objid & "').click();", $timeout) SetError(@error) return $response EndFunc ; #FUNCTION# ;=============================================================================== ; ; Name...........: _ChromeObjGetValueByID() ; Description ...: Gets the value of an element based on it's "id" attribute. ; Syntax.........: _ChromeObjGetValueByID($objid, $index = 0, $timeout = 5) ; Parameters ....: $objid - the value of the "id" attribute ; $timeout - Optional: a number of minutes before exiting the function. ; Return values .: On Success - Returns $value. ; On Failure - Returns "", and sets @ERROR = 2. ; Author ........: seangriffin ; Modified.......: ; Remarks .......: A prerequisite is that the Chrome browser is open ; (Window title = "[REGEXPTITLE:.*- Google Chrome]"). ; ; Related .......: ; Link ..........: ; Example .......: Yes ; ; ;========================================================================================== Func _ChromeObjGetValueByID($objID, $timeout = 5) dim $response = "" $response = _ChromeEval("document.getElementByID('" & $objid & "').value;", $timeout) SetError(@error) return $response EndFunc ; #FUNCTION# ;=============================================================================== ; ; Name...........: _ChromeObjSetValueByID() ; Description ...: Sets the "value" attribute of a element based on it's "id" attribute. ; Syntax.........: _ChromeObjSetValueByID($objid, $value, $timeout = 5) ; Parameters ....: $objid - the value of the "id" attribute ; $value - The text to set the "value" attribute to ; $timeout - Optional: a number of minutes before exiting the function. ; Return values .: On Success - Returns $value. ; On Failure - Returns "", and sets @ERROR = 2. ; Author ........: seangriffin ; Modified.......: ; Remarks .......: A prerequisite is that the Chrome browser is open ; (Window title = "[REGEXPTITLE:.*- Google Chrome]"). ; ; Related .......: ; Link ..........: ; Example .......: Yes ; ; ;========================================================================================== Func _ChromeObjSetValueByID($objid, $value, $timeout = 5) dim $response = "" $response = _ChromeEval("document.getElementByID('" & $objname & "').value = '" & $value & "';", $timeout) SetError(@error) return $response EndFunc