I'm new to the platform and I'm looking for some help with regards to using a snapshot for html table validations.
With two questions, I ask in the following code excerpt taken from the examples page, is it just as simple as listing the file name as a parameter, where string is set to 'filename_ReferenceTableSnapshot'?
Code: Select all
public void Validate_WebTableContentEqual(Ranorex.Adapter repoItem, string filename_ReferenceTableSnapshot, string customLogMessageOverall, string customLogMessageDetail)
{
// check if snapshot file exists
Ranorex.Validate.IsTrue (System.IO.File.Exists (filename_ReferenceTableSnapshot), string.Format("Checking existence of snapshot file: {0}",filename_ReferenceTableSnapshot ));
ElementSnapshot snap;
try
{
snap = Ranorex.Core.ElementSnapshot.CreateFromFile (filename_ReferenceTableSnapshot); // ElementSnapshot.CreateFromFile is available starting with Ranorex 5.4.2
}
catch
{
throw new Ranorex.ValidationException ("Snapshot could not be loaded from file");
}