To verify the file, the two files are same and also check whether the data in it is also correct How to do it using verify function?
Submitted by: AdministratorAnswer1:
Use the SystemFunctions in that case
SYS_CompareText
eg.:
letscompare = SYS_CompareText(sFile1,sFile2)
Answer2:
Open SilkTest (7.6 version)
From the Help Menu, select Help Topics. In the SilkTest Help module, click on the Search Tab. Type in the word Verify and then press the ENTER key. A list is displayed including, Verify function. Read that entry.
It explains how to use it and includes an example.
Answer3:
If ur text file is too big then follow this procedure
1) Read the actual text file and put the contents in a list (Say lsActual)
2)Read the expected text file and put the contents in a list (Say lsExpect)
And Read line by line and Print the mismatch line..
Check with the below code.It will work ..
[+] for ( iLine = 1 ; iLine <= ListCount (lsActContents) ;iLine ++ )
[ ]
[ ]
[-] if(lsActContents [ iLine] != lsExpContents [iLine])
[ ]
[ ]
[ ] bFailure = TRUE
[ ]
[ ]
[ ] fncLogMsg ( "Info", "The actual value in the {sActualFileVerified} text file " )
[ ]
[ ]
[ ] fncLogMsg ( "Info",
"{lsActContents [ iLine] }" )
[ ]
[ ]
[ ] fncLogMsg ( "Info",
"The expected value in the { sExpectedFileVerified } text file ")
[ ]
[ ]
[ ] fncLogMsg ( "Info",
"{lsExpContents [ iLine] }" )
[ ]
[ ]
[ ]
[ ]
Submitted by: Administrator
Use the SystemFunctions in that case
SYS_CompareText
eg.:
letscompare = SYS_CompareText(sFile1,sFile2)
Answer2:
Open SilkTest (7.6 version)
From the Help Menu, select Help Topics. In the SilkTest Help module, click on the Search Tab. Type in the word Verify and then press the ENTER key. A list is displayed including, Verify function. Read that entry.
It explains how to use it and includes an example.
Answer3:
If ur text file is too big then follow this procedure
1) Read the actual text file and put the contents in a list (Say lsActual)
2)Read the expected text file and put the contents in a list (Say lsExpect)
And Read line by line and Print the mismatch line..
Check with the below code.It will work ..
[+] for ( iLine = 1 ; iLine <= ListCount (lsActContents) ;iLine ++ )
[ ]
[ ]
[-] if(lsActContents [ iLine] != lsExpContents [iLine])
[ ]
[ ]
[ ] bFailure = TRUE
[ ]
[ ]
[ ] fncLogMsg ( "Info", "The actual value in the {sActualFileVerified} text file " )
[ ]
[ ]
[ ] fncLogMsg ( "Info",
"{lsActContents [ iLine] }" )
[ ]
[ ]
[ ] fncLogMsg ( "Info",
"The expected value in the { sExpectedFileVerified } text file ")
[ ]
[ ]
[ ] fncLogMsg ( "Info",
"{lsExpContents [ iLine] }" )
[ ]
[ ]
[ ]
[ ]
Submitted by: Administrator
Read Online SilkTest Job Interview Questions And Answers
Top SilkTest Questions
☺ | How to search for html link? |
☺ | How to read .xls file contents without using the ddt wizard? |
☺ | Need help regd. silk test runing thr .bat file on cmd prompt? |
☺ | How to launch 2 web application windows simultaneously thru Silktest? |
☺ | Can SilkTest run on Mac? |
Top Application Program Categories
☺ | AutoCAD Interview Questions. |
☺ | Microsoft Office Interview Questions. |
☺ | Microsoft Outlook Interview Questions. |
☺ | Microsoft Excel Interview Questions. |
☺ | MATLAB Interview Questions. |