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

 NameDescription
MethodGetSnapshot(OpenQA.Selenium.IWebElement)Returns a snapshot (image) of the selenium element.
MethodHighlight(OpenQA.Selenium.IWebElement)Highlights the selenium element in the browser.
MethodHighlight(OpenQA.Selenium.IWebElement,System.Int32)Highlights the selenium elements in the browser for time milliseconds.
MethodScrollIntoView(OpenQA.Selenium.IWebElement)Scrolls the page to make the web element visible.

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

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.

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.

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.

See also