ResourceUtilities GetResourceStream Method WebDriver
Gets a OnlineStream that contains the resource to use.

Namespace: OpenQA.Selenium.Internal
Assembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax

public static Stream GetResourceStream(
	string fileName,
	string resourceId
)

Parameters

fileName
Type: OnlineSystem String
A file name in the file system containing the resource to use.
resourceId
Type: OnlineSystem String
A string representing the resource name embedded in the executing assembly, if it is not found in the file system.

Return Value

A Stream from which the resource can be read.
Exceptions

ExceptionCondition
OpenQA.Selenium WebDriverExceptionThrown if neither the file nor the embedded resource can be found.
Remarks

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

In the same directory as the calling assembly.In the full path specified by the fileName argument.Inside the calling assembly as an embedded resource.

See Also