Hobbes.js utilities
Namespaces
Methods
- 
    
<static> elementsFromPoint(x, y [, document])
 - 
    
    
https://gist.github.com/7265412 Get stack of DOM elements present at x,y coordinates
Parameters:
Name Type Argument Default Description xint the x coordinate, in pixels
yint the y coordinate, in pixels
documentDOMElement <optional> 
hobs.context().document the document in which elements are looking for
Returns:
An array of all the DOM elements found at given coordinates
- Type
 - Array.<DOMElement>
 
 - 
    
<static> listPaths(allSteps)
 - 
    
    
List the computed paths for the testsuites and inner testcases/testsuites
Parameters:
Name Type Description allStepsarray the array of steps to be filtered
Returns:
the array of string containing the computed paths.
- Type
 - array
 
 - 
    
<static> metadataFilter(testsuite, withMetadata)
 - 
    
    
Remove all steps (TestCase and TestSuite) from the given TestSuite that are not matching the given metadata object
Parameters:
Name Type Description testsuitehobs.TestSuite to be filtered
withMetadataobject the object containing the metadata properties and values that should match
Returns:
void, nothing is returned as the given testsuite is directly modified.
 - 
    
<static> pathFilter(testsuite, withPaths)
 - 
    
    
Remove all steps (TestCase and TestSuite) from the given TestSuite that are not matching the given paths object
Parameters:
Name Type Description testsuitehobs.TestSuite to be filtered
withPathsobject the object containing the path value and a type include/exclude
Returns:
void, nothing is returned as the given testsuite is directly modified.
 - 
    
<static> resumeFilter(allSteps, resumePath)
 - 
    
    
Remove all steps (TestCase and TestSuite) that appear before the targeted TestCase path provided as array of names. if the path is not found , then allSteps should be cleared. if the path is found, all the remaining steps to execute should be still part of the allSteps.
Parameters:
Name Type Description allStepsarray the array of steps to be filtered
resumePatharray the array of name representing the path (i.e path = /a/b/c = [ "a", "b", "c"] = "c" as testcase in testsuite "b", which is itself in testsuite "a"
Returns:
true if the path was found and it removed the steps that are not relevant to execute.
- Type
 - boolean
 
 - 
    
<static> safeApplyFn(fn [, context] [, params])
 - 
    
    
Safely executes a function (function execution wrapped in a try catch block)
Parameters:
Name Type Argument Default Description fnfunction the function to execute
context* <optional> 
this the execution context of the function
paramsArray <optional> 
The array of parameters to pass to the function
Returns:
A promise
- Type
 - Promise