This section explains the properties can be accessed on the various items in Badboy Scripts. There are 4 different property types that are recognized by Badboy. These are:
Properties are accessed using the get and set functions that
are available on all script item objects. For example, to access the type of the item with id
32 in your script you could use the "get" function from JScript as follows:
badboy.script.find(32).get("itemType");
The following table lists the properties that are accessible on each type of item.
| All Items | Property Name | Notes |
|---|---|---|
| itemType (readonly) | ||
| All Playable Items | ||
| timeoutSeconds | ||
| timeoutEnabled | ||
| timeoutAction | ||
| targetWindow | ||
| itemName | ||
| disabled | set to 'true' or 'false' to disable or enable the item. | |
| documentation | ||
| waitForPageToLoad | ||
| sourceLocation | ||
| recordResponses | ||
| quiescenceTimeMs | ||
| isInherited | ||
| Assertion | ||
| captureScreenShot | ||
| scalingPercent | ||
| captureDuplicates | ||
| passed | 0 if the Assertion failed last time it played, 1 if the Assertion passed last time it was played | |
| AssertionFailure | ||
| description | ||
| timeStamp | ||
| BitmapCheckItem | ||
| RGBTolerance | ||
| yTolerance | ||
| xTolerance | ||
| b | ||
| g | ||
| r | ||
| y | ||
| x | ||
| type | ||
| CaptureItem | ||
| name | ||
| timeStamp | ||
| ClickItem | ||
| xPosition | ||
| yPosition | ||
| windowName | ||
| windowSizeX | ||
| windowSizeY | ||
| enableRestoreSize | ||
| waitForPageLoad | ||
| cascade | ||
| raiseToTop | ||
| clickType | ||
| upXPosition | ||
| upYPosition | ||
| dragMouse | ||
| waitForWindow | ||
| ContentCheckItem | ||
| pattern | ||
| type | ||
| searchMode | ||
| bUseRegex | ||
| checkMessageBoxes | ||
| checkRuntimeBodyContent | ||
| Custom | ||
| name | ||
| toolboxName | ||
| modifiedTimeStamp | ||
| DataSourceItem | ||
| connectString | ||
| loadString | ||
| loadType | ||
| mapType | ||
| tableName | ||
| dataSourceName | ||
| DownloadHandlerItem | ||
| responseType | 0, or 1 for whether to save or cancel the download respectively. | |
| location | The location in which to save the downloaded file. If an existing directory then the file name is determined automatically, if a file then the exact file name is used. | |
| openAction | 0,1,2 for whether to not open the file, open externally or open internally. | |
| FormPartItem | ||
| headers | ||
| substituteVariables | ||
| sourceType | One of either "file" or "script" | |
| sourceFile | Used only if sourceType is set to "file". | |
| FormPopulator | ||
| headers | ||
| substituteVariables | ||
| formName | ||
| submit | ||
| formIndex | ||
| actionType | ||
| ignoreHiddenFields | ||
| useRegex | ||
| FormValue | ||
| name | ||
| value | ||
| index | Index of element to populate when duplicate names exist. | |
| sendEvents | true or false. Set to 'true' to cause DOM events such as keyup, keydown, onchange to be sent when field is populated. | |
| retainFocus | true or false. Set to 'true' to cause field to keep its focus after population. Only applies when sendEvents is set to true. | |
| Increment | ||
| variableName | ||
| strategy | algorithm to use for changing value of variable, default = 0 random integer = 1, next list value = 2, next integer = 3 | |
| precision | number of digits to use for random part of value (only applies to random strategy). | |
| JScriptCheck | ||
| script | ||
| frameType | ||
| frameName | ||
| KeysItem | ||
| keys | characters / virtual key codes to send | |
| runInBackground | true / false - whether to execute asynchronously | |
| delaySeconds | number of seconds to wait before sending keystrokes | |
| windowCaption | window to wait to have focus before sending keystrokes | |
| autoFocus | 'true' or 'false'. If 'true', window with name corresponding to windowCaption will be automatically raised to the top and focused as soon as it is found. | |
| Navigation | ||
| reference | Reference for the active reference type. Note: A referenceType must be set prior to setting the reference property. | |
| targetFrame | ||
| continueOnFailure | ||
| referenceType | Integer from 1 to 3, indicating type of reference | |
| index | Integer, zero-based, indicating index of reference to Navigate for the active reference type when executed. Note: each reference type maintains its own index, setting the index using this property only sets it for the current active reference, as controlled by referenceType property. This property can be set but is ignored for JavaScript references. | |
| filterType | One of the values "All", "Links", or "Buttons". The referenceType must be set prior to setting filterType. | |
| eventType | ||
| isPassive | ||
| passiveTimeoutMs | ||
| useRegex | Boolean property - set to 'true' or 'false' | |
| MessageBoxItem | ||
| message | ||
| type | ||
| response | ||
| useRegex | 'true' if 'message' should be interpreted as a regular expression, false otherwise. | |
| waitTimeSeconds | ||
| Parameter | ||
| name | ||
| value | ||
| method | ||
| PlayContext | ||
| playPosition | ||
| Request | ||
| host | ||
| path | ||
| postData | ||
| protocol | ||
| resource | ||
| targetFrame | ||
| label | ||
| headers | ||
| multipartBoundary | ||
| newWindowWidth | ||
| newWindowHeight | ||
| formCharset | ||
| defaultMethod | ||
| bUseLenientSubrequestCount | ||
| Response | ||
| timeMs | ||
| size | ||
| content | ||
| totalSize | ||
| errorFlag | ||
| errorCode | ||
| timeStamp | ||
| logContent | ||
| ResponseCheckItem | ||
| minSeconds | ||
| maxSeconds | ||
| minSizeKB | ||
| maxSizeKB | ||
| checkSize | ||
| ResponseError | ||
| description | ||
| category | ||
| level | Integer - 0=ERROR, 1=WARNING, 2=INFO | |
| url | ||
| SaveItem | ||
| writerClass | ||
| fileName | ||
| variableExpression | ||
| styleSheet | ||
| exportImages | ||
| showSavedFile | ||
| includeResponseContent | ||
| sendType | ||
| emailTo | ||
| emailCC | ||
| emailSubject | ||
| appendMode | ||
| sendAsAttachment | ||
| frameName | ||
| ScheduleItem | ||
| scriptType | ||
| scheduleDelayType | ||
| scriptFile | ||
| delayHours | ||
| delayMinutes | ||
| inheritVariables | ||
| ScreenShot | ||
| label | ||
| scalingPercent | ||
| fileName | ||
| saveToFile | ||
| addLabel | ||
| SpiderItem | ||
| browseLinks | ||
| clickButtons | ||
| captureResponses | ||
| randomPopulate | ||
| navigationMode | ||
| targetType | ||
| targetFrame | ||
| loopAutomatically | ||
| randomWalk | ||
| Step | ||
| name | ||
| repeatVariable | ||
| repetitions | ||
| repetitionCount | Read only - returns current repetition when a looping over a fixed number of iterations. | |
| repeatType | ||
| incrementAutomatically | ||
| incrementAll | ||
| SummaryCheckItem | ||
| locatorType | ||
| summaryId | ||
| summarySelector | ||
| combineType | ||
| TestItem | ||
| title | ||
| template | ||
| Thread Item | ||
| maxThreads | ||
| pauseWhileStarting | ||
| startGradual | ||
| startIncrement | ||
| startInteveralSeconds | ||
| pauseWhileStopping | ||
| stopGradual | ||
| stopIncrement | ||
| stopInteveralSeconds | ||
| durationType | ||
| durationTimeSeconds | ||
| engine | ||
| maxIterations | ||
| runningCount | Read-only property, returns number of threads currently in running state. | |
| stoppedCount | Read-only property, returns number of threads currently in stopped state. | |
| Timer | ||
| waitMs | ||
| cascade | ||
| Variable | ||
| dataSourceId | ||
| isAutoVariable | ||
| autoVariableExpression | ||
| Variable Check | ||
| variableName | The name of the variable that will be checked | |
| regex | Regular expression to be matched against variable contents | |
| Variable Setter | ||
| regex | ||
| variableName | ||
| valueList | ||
| regex | ||
| targetFrame | ||
| sourceType | Whether to extract content from original page source or from runtime content (only applicable when Values of Regex option is active). Valid values are 0 (original) and 1 (runtime). | |
| parseVariableReferences | ||
| isCascading | ||
| noOverWrite | ||
| fileName | ||
| type | Specifies how variable is populated. Values are:
|
|
| parseCSV | It set to true and type is 'Content of File' then the content of the loaded file will be parsed and variables created for each column found in the file. Only applies when type is set to Content of File option. | |
| Window Caption Check | ||
| text | ||
| searchWindowType | ||
| useRegex | ||
| searchWindowName | ||
| windowClass | ||
| WindowControlItem | ||
| targetType | 0,1,2 for options close Active / Target Window, All Popups or None | |
| focusType | 0,1,2 for options focus Main, Popup or None | |
| focusWindowName | Name of window to focus, when "Popup" is selected for focusType |