Image Validation based on a Variable Value
Posted: Mon Apr 15, 2019 9:37 am
Hi)
I am trying to use Image validation based on a value of variable.
with a If - else construction
One repoelement has different screenshots , based on previous user actions.
I am trying to do something like this
but i get an error "The name 'Barcode_Image_Screenshot2' does not exist in the current context (CS0103)
The name 'Barcode_Image_Screenshot2_Options' does not exist in the current context (CS0103)
I am validating same repoelement, but with different screenshots... So i don't know how to add this attributes to me conditions
Please help me to get it work)
i know nothing about c#.. And i would appreciate any help.
Thanks !
I am trying to use Image validation based on a value of variable.
with a If - else construction
One repoelement has different screenshots , based on previous user actions.
I am trying to do something like this
Code: Select all
public void Validate_Barcode_Image(RepoItemInfo imgtagInfo)
{
if (varBarcodeValue.Equals("111111"))
{
Report.Log(ReportLevel.Info, "Validation", "Validating ContainsImage (Screenshot: 'Screenshot1' on item 'imgtagInfo'.", imgtagInfo);
Validate.ContainsImage(imgtagInfo, Barcode_Image_Screenshot1, Barcode_Image_Screenshot1_Options);
}
Report.Log(ReportLevel.Info, "Validation", "Validating ContainsImage (Screenshot: 'Screenshot2' on item 'imgtagInfo'.", imgtagInfo);
Validate.ContainsImage(imgtagInfo, Barcode_Image_Screenshot2, Barcode_Image_Screenshot2_Options);
}
The name 'Barcode_Image_Screenshot2_Options' does not exist in the current context (CS0103)
I am validating same repoelement, but with different screenshots... So i don't know how to add this attributes to me conditions
Please help me to get it work)
i know nothing about c#.. And i would appreciate any help.
Thanks !