Share this page

# Utils Class

OpenText Functional Testing for Developers (Selenium) utilities.

## C# syntax

    public class Utils

## Inheritance hierarchy

    LeanFT.Selenium.Utils

Namespace: LeanFT.Selenium

Assembly: LeanFTForSelenium

The LeanFT.Selenium.Utils class exposes the following members:

## Method summary

| Name | Description
--- | --- | ---
| GetSnapshot(OpenQA.Selenium.IWebElement) | Returns a snapshot (image) of the selenium element.
| Highlight(OpenQA.Selenium.IWebElement) | Highlights the selenium element in the browser.
| Highlight(OpenQA.Selenium.IWebElement,System.Int32) | Highlights the selenium elements in the browser for time milliseconds.
| ScrollIntoView(OpenQA.Selenium.IWebElement) | Scrolls the page to make the web element visible.

Back to top

## Utils.GetSnapshot(OpenQA.Selenium.IWebElement)

Returns a snapshot (image) of the selenium element.

C# Syntax

    public static Image GetSnapshot(IWebElement element)

Parameters

element. The element to retrieve a snapshot for.

Returns

A snapshot of the element.

Return Type

System.Drawing.Image

Back to top

## Utils.Highlight(OpenQA.Selenium.IWebElement)

Highlights the selenium element in the browser.

C# Syntax

    public static void Highlight(IWebElement element)

Parameters

element. The web element to highlight.

Back to top

## Utils.Highlight(OpenQA.Selenium.IWebElement,System.Int32)

Highlights the selenium elements in the browser for time milliseconds.

C# Syntax

    public static void Highlight(IWebElement element, Int32 time)

Parameters

element. The web element to highlight.

time. The time (in milliseconds) that the element is highlighted. In case of a negative number, the method throws an ArgumentException.

If time is less than 150, the element is not highlighted.

Back to top

## Utils.ScrollIntoView(OpenQA.Selenium.IWebElement)

Scrolls the page to make the web element visible.

C# Syntax

    public static void ScrollIntoView(IWebElement element)

Parameters

element. The web element to scroll to.

Back to top

See also:

- LeanFT.Selenium Namespace

Tips to improve your search results... OpenText™ Functional Testing for Developers (Selenium) .NET SDK All versions OpenText™ Functional Testing for Developers (Selenium) SDK 25.2 All View Local Help Center View Online Help Center Version: