Skip to content

The most important and useful C# methods for SETUP/TEARDOWN autotests in Ranorex IDE.

License

Notifications You must be signed in to change notification settings

seriousQA/Ranorex-Methods-Libraries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ranorex-Methods-Libraries

C#

The libraries contain the most important and useful C# methods for test automation in Ranorex IDE.

Requirements:

  • Windows
  • Ranorex Studio

How to use:

  1. download the libraries (*.cs files);
  2. add (or link) this *.cs files in your project;
  3. use the methods in yours record or code modules;

License:

License: MIT

SETUPlib is a SETUP code collection and includes:

  • openApp() to run 32-bit or 64-bit application (AUT);
  • deleteRegKey() to delete from the registry the key for application;
  • rmDir() to remove such traces of an application (AUT) like \Documents, \Roaming and s.o.;
  • createNewProject() to start an application (AUT) and create a new project in it (as GUI method example);
  • openProject() to open a specific project in application (AUT) (as GUI method example);
  • resizeWindow() to resize an AUT window to actual monitor resolution;
  • deleteFilesFromDir() to remove from \FolderResult all files created during the test run;
  • checkDump() to send a dump with a comment (as GUI method example);
  • createFolderResult() to create a results folder for each test product (AUT).

SetKeyboardLayout TestModule is using to change Windows OS keyboard layout using C#. For example, U.S. English layout = "00010409", German layout = "00010407", Russian layout = "00010419". More Info from MSDN.

TheFirstRun TestModule is using to run 32-bit or 64-bit test application and resize window.

StartPopupWatcher TestModule is using to start a PopupWatcher to handle dialogs that can possibly come up during test run.

TEARDOWNlib is a TEARDOWN code collection and includes:

  • closeApp() to find and kill process of test application (AUT);
  • cleanUpResultsFolder() to delete a results folder for each AUT;
  • closeProjectWindow() to close the test product (as GUI method example);
  • closeAppInstances() to close all instances of AUT;
  • killProcessTree() to kill a process tree and all children using taskkill;
  • killProcessAndChildren() to kill a process and all children using ManagementObjectSearcher.

METHODSlib is a collection of useful methods for test automation and includes:

#region Data

  • removeCharsInString() to remove the last characters of string;
  • getFirstChars() to get first characters of string;
  • getLastChars() to get last characters of string;
  • concatenateStrings() to concatenate two strings;
  • compareStrings() to compare strings;
  • validateAttIsNullOrEmpty() to validate the attribute value of repoItem isn't null or empty;
  • getStringToLower() to get a new string in which all the characters are converted to lowercase;
  • getStringToUpper() to get a new string in which all the characters are converted to uppercase;

#region DateTime

  • getCurrentDate() to get current date with specified format;
  • getDateInNewFormat() to get different date format;
  • addMonths() to add months to date (the same you can do with days or years);
  • getFileCreationTime() to get the time of file creation;

#region Files

  • getFileName() to get file[0] name if exists;

#region DevExpress

  • getCoordinates() to get a coordinates of text in the PDF file.

#region randomGenerators

  • generateRandomString() to generate random string;
  • generateRandomInt() to generate random integer;

About

The most important and useful C# methods for SETUP/TEARDOWN autotests in Ranorex IDE.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages