browser
Summary
Helps using some protractor browser's features.
Item Index
Methods
- click static
- deactivateAnimations static
- init static
- setSize static
- takeScreenshot static
- writeScreenShot static
Methods
click
Syntax
Summary
Clicks on an element.
There are many issues with click events in web drivers, the same click is sometimes performed, and sometimes not. Moving the cursor to the element then performing a click seems to be more stable. It also checks if the element is clickable before clicking on it.
Also the banner in position fix prevent the driver to click on elements behind it. To avoid this problem, scroll up to the element minus the height of the banner.
Parameters:
-
elementFinder
ElementFinderThe element to click
-
[delay]
Number optionalThe delay in milliseconds to wait before clicking on the element
Returns:
Promise resolving when element is clicked
deactivateAnimations
Syntax
deactivateAnimations
()
static
Summary
Disables all animations.
Example:
var browserAPI = require('@openveo/test').e2e.browser;
browserAPI.deactivateAnimations();
init
Syntax
Summary
Sets process.protractorConf to the configuration of the actual capability.
Returns:
Promise resolving when init is done
Example:
var browserAPI = require('@openveo/test').e2e.browser;
browserAPI.init();
setSize
Syntax
Summary
Sets browser's size.
Returns:
Promise resolving when the browser size is set
Example:
var browserAPI = require('@openveo/test').e2e.browser;
browserAPI.setSize(800, 600);
takeScreenshot
Syntax
Summary
Takes a screenshot of the actual browser state.
Parameters:
Returns:
Promise resolving when the capture is made
Example:
var browserAPI = require('@openveo/test').e2e.browser;
browserAPI.takeScreenshot('/tmp', 'myScreenshot');