Can I validate HTML label value with excel file or any other ways?

Hello,

I want to validate or compare label (HTML tag) value with excel file or any other ways to validate label value.

Please help.

Please look the screen shot which I want to compare.

Below two objects are captured during web record.

label value new.PNG

Label Object.PNG

Hi Arun,

You can use keyword ‘Verify Element Text’ if value is stored between tags like this

hello


else ‘Get Attribute’ if value is stored inside tag attribute. example

Expected value can be stored in:- a) global variable b) local variable c) data set

If you want to compare with value present in excel then you can proceed this way :-

1. Create excel sheet with column and enter . save it
2. In Studio, Right click on Data Set folder and select excel data set from dropdown.
3. Now browse file which you created in step 1. and then click on save button. (ctrl +s).
4. Go to testcase and add test step with keyword ‘Verify Element Text’ . Select object from obj repository and then click on input column. Select excel sheet and select column.

This will work perfectly.
Kindly let me know if clarification required

Thank you Himanshu for your positive response. Its working fine.