The following main use cases are supported:
eyes.check(Target.window())
Just take the screenshot
eyes.check(Target.window().fully())
TBD
Element can be provided as one of the following:
- CSS selector string
- Selenium Locator object (or equivalent in other frameworks if exists)
- WebElement object (or equivalent in other frameworks if exists)
// 1. CSS selector string
eyes.check(Target.region('#content'))
// 2. Selenium locator
eyes.check(Target.region(By.id('content')))
// 3. WebElement
const el = await driver.findElement(By.id('content'))
eyes.check(Target.region(el))
// 3a. WDIO element
const el = await browser.element('#content')
eyes.check(Target.region(el))
If element is inside a frame (relative to current driver state), then the frame chain should be specified. The element can still be provided in all possible methods described above by chaining .region
:
eyes.check(Target.frame('frame').region('#content'))
-
For all inputs except a WebElement, the existence of the element should be verified. For WebElement, need to verify it's not stale, and if it is then refresh it (locator information should exist)
-
[general] hide scrollbars in all frames in the frame chain of (driver/checkSettings?)
-
calculate element's region (EyesWebElement.getRect() (Math.ceil || 0) --> Region with CoordinatesType.CONTEXT_RELATIVE --> this._imageLocation)
-
save image location based on element rect
-
[general] sleep MATCH_INTERVAL (500ms)
-
[general] scroll to 0,0 so that the DOM is synchronized with the image
-
[general] get device pixel ratio
-
[general] get entire size of html element (ContextBaseScaleProvider)
All methods of providing the element from the element section apply.
TBD
eyes.
TBD
- TestCheckPageWithHeader_Window
- TestCheckWindow
- TestCheckWindow_Fluent
- TestCheckWindowAfterScroll
- TestCheckWindowViewport
- TestCheckWindowWithFloatingByRegion_Fluent
- TestCheckWindowWithFloatingBySelector_Fluent
- TestCheckWindowWithIgnoreBySelector_Fluent
- TestCheckWindowWithIgnoreBySelector_Centered_Fluent
- TestCheckWindowWithIgnoreBySelector_Stretched_Fluent
- TestDoubleCheckWindow
- TestCheckFullWindowWithMultipleIgnoreRegionsBySelector_Fluent
- TestCheckPageWithHeader_Window_Fully
- TestCheckWindow_Body
- TestCheckWindow_Html
- TestCheckWindow_Simple_Html
- TestCheckWindowFully
- TestCheckWindowWithIgnoreRegion_Fluent
- Test_VGTestsCount_1
- TestCheckElementFully_Fluent
- TestCheckElementWithIgnoreRegionByElementOutsideTheViewport_Fluent
- TestCheckElementWithIgnoreRegionBySameElement_Fluent
- TestCheckPageWithHeader_Region
- TestCheckPageWithHeaderFully_Region
- TestCheckRegion
- TestCheckRegion2
- TestCheckRegionInAVeryBigFrame (failures)
- TestCheckRegionInAVeryBigFrameAfterManualSwitchToFrame (failures)
- TestCheckRegionBySelectorAfterManualScroll_Fluent
- TestCheckRegionInFrame (failures)
- TestCheckRegionInFrame_Fluent (failures)
- TestCheckRegionWithIgnoreRegion_Fluent
- TestCheckOverflowingRegionByCoordinates_Fluent
- TestCheckRegionByCoordinates_Fluent
- TestCheckRegionByCoordinateInFrame_Fluent (failures)
- TestCheckRegionByCoordinateInFrameFully_Fluent
- TestSimpleRegion
- TestCheckFrame
- TestCheckFrame_Fluent
- TestCheckFrameFully_Fluent
- TestCheckFrameInFrame_Fully_Fluent
- TestCheckFrameInFrame_Fully_Fluent2 (?)
- TestCheckRegionInFrame3_Fluent
- TestScrollbarsHiddenAndReturned_Fluent