Utils Class

LeanFT for 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
Method GetSnapshot(OpenQA.Selenium.IWebElement) Returns a snapshot (image) of the selenium element.
Method Highlight(OpenQA.Selenium.IWebElement) Highlights the selenium element in the browser.
Method Highlight(OpenQA.Selenium.IWebElement,System.Int32) Highlights the selenium elements in the browser for time milliseconds.
Method 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: