didacher
11 years agoOccasional Contributor
Check Image (Regions) dynamically using a function
Hi all,
I am using VBScript in my keyword testing. I use the following line in order to compare on the fly images with stored images (regions).
result = Regions.myStoredImage.Check(liveImage, True, False, 20, 60)
I want to implement a function that takes as arguments the on the fly image object and the name (string) of the stored image region:
Function compareImages(liveImage, storedImage)
And use it like this:
result = compareImage(liveImage, "myStoredImage")
How could I implement that? I can't do this:
Function compareImages(liveImage, storedImage)
compareImages = Regions.storedImage.Check(liveImage, True, False, 20, 60)
End Function
I am using VBScript in my keyword testing. I use the following line in order to compare on the fly images with stored images (regions).
result = Regions.myStoredImage.Check(liveImage, True, False, 20, 60)
I want to implement a function that takes as arguments the on the fly image object and the name (string) of the stored image region:
Function compareImages(liveImage, storedImage)
And use it like this:
result = compareImage(liveImage, "myStoredImage")
How could I implement that? I can't do this:
Function compareImages(liveImage, storedImage)
compareImages = Regions.storedImage.Check(liveImage, True, False, 20, 60)
End Function