Table of Contents

Interface IHtmlContent

Namespace
Xping.Sdk.Validations.Content.Html
Assembly
Xping.Sdk.dll

Defines a contract for HTML content manipulation and element location within a web page.

public interface IHtmlContent

Methods

GetByAltText(string, TextOptions?)

Locates elements with an 'alt' attribute text matching the specified string.

IHtmlLocator GetByAltText(string text, TextOptions? options = null)

Parameters

text string

The text to match against the 'alt' attribute.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByAltText(Regex, TextOptions?)

Locates elements with an 'alt' attribute text matching the specified regular expression.

IHtmlLocator GetByAltText(Regex text, TextOptions? options = null)

Parameters

text Regex

The regular expression to match against the 'alt' attribute.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByLabel(string, TextOptions?)

Locates elements with a 'label' element text matching the specified string.

IHtmlLocator GetByLabel(string text, TextOptions? options = null)

Parameters

text string

The text to match against the 'label' element text.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByLabel(Regex, TextOptions?)

Locates elements with a 'label' element text matching the specified regular expression.

IHtmlLocator GetByLabel(Regex text, TextOptions? options = null)

Parameters

text Regex

The regular expression to match against the 'label' element text.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByPlaceholder(string, TextOptions?)

Locates elements with a 'placeholder' attribute text matching the specified string.

IHtmlLocator GetByPlaceholder(string text, TextOptions? options = null)

Parameters

text string

The text to match against the 'placeholder' attribute.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByPlaceholder(Regex, TextOptions?)

Locates elements with a 'placeholder' attribute text matching the specified regular expression.

IHtmlLocator GetByPlaceholder(Regex text, TextOptions? options = null)

Parameters

text Regex

The regular expression to match against the 'placeholder' attribute.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByTestId(string, TextOptions?)

Locates elements with a test id attribute matching the specified string. By default, the data-testid attribute is used as a test id. Use TestIdAttribute to configure a different test id attribute if necessary.

IHtmlLocator GetByTestId(string testId, TextOptions? options = null)

Parameters

testId string

The text to match against the test id attribute.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByTestId(Regex, TextOptions?)

Locates elements with a test id attribute matching the specified regular expression. By default, the data-testid attribute is used as a test id. Use TestIdAttribute to configure a different test id attribute if necessary.

IHtmlLocator GetByTestId(Regex testId, TextOptions? options = null)

Parameters

testId Regex

The regular expression to match against the test id attribute.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByTitle(string, TextOptions?)

Locates elements with a 'title' attribute text matching the specified string.

IHtmlLocator GetByTitle(string text, TextOptions? options = null)

Parameters

text string

The text to match against the 'title' attribute.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

GetByTitle(Regex, TextOptions?)

Locates elements with a 'title' attribute text matching the specified regular expression.

IHtmlLocator GetByTitle(Regex text, TextOptions? options = null)

Parameters

text Regex

The regular expression to match against the 'title' attribute.

options TextOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located elements.

Locator(string, FilterOptions?)

Locates an HTML element using an XPath selector and returns a locator for further actions.

IHtmlLocator Locator(string selector, FilterOptions? options = null)

Parameters

selector string

The string representing XPath expression used to resolve the DOM element.

options FilterOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located element.

Locator(XPathExpression, FilterOptions?)

Locates an HTML element using an XPath selector and returns a locator for further actions.

IHtmlLocator Locator(XPathExpression selector, FilterOptions? options = null)

Parameters

selector XPathExpression

The XPath expression used to resolve the DOM element.

options FilterOptions

Optional parameters for customizing the locator behavior.

Returns

IHtmlLocator

An IHtmlLocator instance representing the located element.