GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 616 of 645    Print  
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?


  
Total Answers and Comments: 2 Last Update: June 10, 2008     Asked by: Sunita2k 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: NawabShaikh
 

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



Above answer was rated as good by the following members:
md_vinodh
April 27, 2008 02:04:20   #1  
NawabShaikh Member Since: January 2007   Contribution: 208    

RE: Compare text field

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


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 10, 2008 11:05:54   #2  
md_vinodh Member Since: April 2008   Contribution: 32    

RE: Compare text field
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)






 
Is this answer useful? Yes | No

 Related Questions

I have 10 Edit Boxes in my application. i Named them as Text1, Text2, Text3...Text10. Now i want to set values in these Text Boxes using Loop Statement. Can i Usefor i=0 to 10 browser("b1").page("p1").WebEdit("Text" & i).set "value" &inext**********Is it acceptable WebEdit("Text"&i) ? I am getting error here.Any suggestions?
Read Answers (6) | Asked by : Nagelli Anil Kumar

How do we automate the process of editing an XML file. coz if i just record opening an XML file making changes and saving.and when i run this simple recording some other field gets edited in the run process.please help and let me know know what should be done to automate XML files???
Read Answers (1) | Asked by : charm

How can we program using QTP to generate a text file which has data inside in a particular format which also needs to be programmed using QTP ?
Read Answers (1) | Asked by : ashish

Can anybody tell me the purpose of output checkpoints in QTP. how u r testing the text data through text checkpoints. how u r testing text data in the webpage through parameterization. my application is web based application. my requirement is i am retriving the data from the database to webpage. i put text checkpoint on the text, but problem is the parameterization. can anybody help me with code. i will appreciate if anybody can say
Read Answers (2) | Asked by : manoj_k3

I need to write the QTP results to a text file or an Excel file as i don't want to see the results in QTP results window.Please Can anybody provide the exact code for itUrgent...............................Thanks in advanceUday
Read Answers (7) | Asked by : Uday

How to identifier 4 similar java links in an pageI have 4 similar java links in a same page, in their objects properties, only href are different.Here are links:Java(“*”, ’03/01/2006’)Java(“*”, ’02/06/2006’)Java(“*”, ’10/09/2006’)Java(“*”, ’11/05/2006’)In object repository, I named first link to “date_01” and done this:For i =0 to 3browser("b1").page("p1").link("Text",
Read Answers (1) | Asked by : lozzko

I have link on my screenBuild Activity (9).Clicking on the link a page apperas.The number part above keeps on changing.If i record this click with text "Build Activity (9)"and twhile execution teh number changes say text becomes "Build Activity (2)" QTP thros an error saying then Object properties do not match or the object does not exist.I think Regexp can be a solution for this.Can anyone explain me how.Email: arthere@hotmail.com
Read Answers (1) | Asked by : Gunjan

Hi Friends,I want to test an web Application using QTP. The problem is, the texts/images appearing in the screen are not allowed to be selected.In such a cease how can I insert 'Text' Check points?Is there any alternative available?Please let me know if you have any idea. Thanks in advance for your help.Regards,Pradeep
Read Answers (1) | Asked by : pradeeps

How do you fire an event in QTP?Application is been developed in Java-->using swing components.Since there are 5 search buttons, each search button has 5 different class or state. When we store these 5 different class or state in object repository, its getting stored for 1 search button. Like this we have for 5 different search button.At the time of recording the mouse is placed on the button, while runing the same script qtp is unable to recoginise that button, Since its at disable state. Manual
View Question | Asked by : Vijay

How can i save result on text format so i can send that copy to team for viewing the resultsthanks in advance
Read Answers (2) | Asked by : priya123


 Sponsored Links

 
Related Articles

Breaking Into Your Field Of Interest With Education And No Experience

Breaking Into Your Field Of Interest With Education And No Experience Getting a job after college can be a scary experience for just about everyone especially if you have little or no experience in your field of interest However just because you do not have experience in your field doesn’
 

Oracle Apps Implementing Key Flex field and Descriptive Flex field

Oracle Apps 11i Tutorials Implementing Key Flex field and Descriptive Flex field This tutorial tells you about implementation and other features provided in the implementation section mosgoogle Implementing Flex fields Key Flexfield The basic steps in defining a key Flexfields are as given below You
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape