Compare text field

How to compare the items given in a text field when the same is stored in a table format in another web page?

Questions by Sunita2k

Showing Answers 1 - 3 of 3 Answers

Step 1: Fetch the Text from the Text Field.

strText = Browser(b).Page(P).Frame(f).WebEdit(T).getROProperty("value")

Step 2: Fetch the Text from the Table


strTBL_text = Browser(B).Page(p).Frame(f).WebTable(w).GetCellData(1,1)



Step 3: Comparision


if strComp(strText,strTBL_text) = 0 then

  Reporter.ReportEvent micPass, "PASS","PASS"

Else

  reporter.ReportEvent micFail,"FAIL","FAIL"

End If



Regards,

Nawab

md_vinodh

  • Jun 10th, 2008
 

Hi,

 First Get the Value and store some Variable

Code:

Value1 =  Browser("").Page(""). Webedit("").Get RO Property("Value")
Value2 =  Browser("").Page(""). Webedit("").Get RO Property("Value")

Variable have value and now we want to compare the value.

String Compare function:

Dim Value1,Value2, MyCompare

Mycompare = strcomp(Value1,Value2,1)





  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions