Skip to main content

Target class

This class provides methods that are used to define the top level target (the entire window, region, element, frame, etc.) for the check method.

Once you create a SeleniumCheckSettings object using one of the factory methods defined by this class, you can configure the checkpoint by calling other methods from the SeleniumCheckSettings class, chaining them one after the other using the '.' operator.

Import statement

import com.applitools.eyes.selenium.fluent.Target;

frame method

Syntax

eyes.check(Target.frame(by))
eyes.check(Target.frame(frameNameOrId))
eyes.check(Target.frame(index))
eyes.check(Target.frame(webElement))

Note: This method is a static method.

Parameters

by

Type: By

An element selector which is chosen using the Selenium By class.

frameNameOrId

Type: String

The name or id of the frame element.

index

Type: int

The index of the iframe (as in Selenium By Index).

webElement

Type: WebElement

A reference to the frame element.

Return value

Type: SeleniumCheckSettings

region method

Syntax

eyes.check(Target.region(region))
eyes.check(Target.region(by))
eyes.check(Target.region(webElement))

Note: This method is a static method.

Parameters

region

Type: Region

The region to be checked.

by

Type: By

An element selector which is chosen using the Selenium By class.

webElement

Type: WebElement

An object which defines a region.

Return value

Type: SeleniumCheckSettings

window method

Syntax

eyes.check(Target.window())

Note: This method is a static method.

Parameters

This method does not take any parameters.

Return value

Type: SeleniumCheckSettings