Table of Contents

Class ResourceUtilities

Namespace
OpenQA.Selenium.Internal
Assembly
WebDriver.dll

Encapsulates methods for finding and extracting WebDriver resources.

public static class ResourceUtilities
Inheritance
ResourceUtilities
Inherited Members

Methods

GetResourceStream(string, string)

Gets a Stream that contains the resource to use.

public static Stream GetResourceStream(string fileName, string resourceId)

Parameters

fileName string

A file name in the file system containing the resource to use.

resourceId string

A string representing the resource name embedded in the executing assembly, if it is not found in the file system.

Returns

Stream

A Stream from which the resource can be read.

Remarks

The GetResourceStream method searches for the specified resource using the following algorithm:

Exceptions

WebDriverException

Thrown if neither the file nor the embedded resource can be found.

IsValidResourceName(string)

Returns a value indicating whether a resource exists with the specified ID.

public static bool IsValidResourceName(string resourceId)

Parameters

resourceId string

ID of the embedded resource to check for.

Returns

bool

true if the resource exists in the calling assembly; otherwise false.