Methods
-
blurActiveElement() → {Eagle.constructor}
-
Blurs the DOM active element. The command is sent to the remote browser using the execute command.
Returns:
- Type
- Eagle.constructor
-
captureElementByCssSelector(selector, imageLocation, imageName) → {Eagle.constructor}
Captures a screenshot of specified element and compares it to a reference image of the element.
-
Takes and saves a screenshot fitted to the DOM element dimensions, then asserts the 2 images (actual image and ref image). If the REF image doesn't exists, REF image is created and assertion is true. Else, images are compared and in case of differences, a third image is generated.
Parameters:
Name Type Description selector
string CSS selector of specified element
imageLocation
string path of the screenshot directory
imageName
string name of the screenshot
Returns:
- Type
- Eagle.constructor
-
captureFullScreenShot(imageLocation, imageName) → {Eagle.constructor}
-
Takes and saves a screenshot of the current 'visible' page. Unvisible elements won't be captured (like end of a scrollable page).
Parameters:
Name Type Description imageLocation
string path of the screenshot directory
imageName
string name of the screenshot
Returns:
- Type
- Eagle.constructor
-
disableSpellCheck() → {Eagle.constructor}
Disables spellcheck in the current page.
-
Adds a spellcheck attribute to the HTML body tag and sets it to false. The spellcheck will be disabled only for the current page.
Returns:
- Type
- Eagle.constructor
-
initConfig(configuration) → {Eagle.constructor}
-
Initializes configuration.
Parameters:
Name Type Description configuration
Object the Eagle configuration
Returns:
- Type
- Eagle.constructor
Example
Configuration example Eagle.initConfig({ timeout: 10000, url: 'http://mywebsite.com/', screenshotServer: 'http://localhost:1234/, dimensions: { x:1024, y:768 });
-
setCookie(name, value) → {Eagle.constructor}
-
Sets a cookie in current web page
Parameters:
Name Type Description name
string name of the cookie
value
string value of the cookie
Returns:
- Type
- Eagle.constructor
-
setup() → {Eagle.constructor}
-
Initializes remote browser.
Returns:
- Type
- Eagle.constructor