Click or drag to resize

FilesHelperRenameFile(String, String, String, FileType) Method

Framework to automate tests using Selenium WebDriver
Rename the file of given type and check if file was renamed with ShortTimeout, shorten the name of file if needed be removing "_".

Namespace: Ocaramba.Helpers
Assembly: OcarambaLite (in OcarambaLite.dll) Version: 1.0.0+d8e789f8644d1a9b63485ad7914acf4f489f3ef9
Syntax
C#
public static string RenameFile(
	string oldName,
	string newName,
	string subFolder,
	FileType type
)
Request Example

Parameters

oldName  String
The old name.
newName  String
The new name.
subFolder  String
The subFolder.
type  FileType
The type of file.

Return Value

String
The new name in case its shorten.
Example
How to use it:
C#
string newName = FilesHelper.RenameFile("filename.txt", "newname", this.DriverContext.DownloadFolder, FileType.Csv);
See Also