can u write one user defined function for webedit class.

Answer Posted / sunitha

Gneric Function for WebEdit
Values strBrow,strPAge come from object repository
Value strEditboxName is the one which we get on spying the
object and getting its property name.
Value strVal is the one which we want to set in Edit box

function fg_SetValueinEditbox
(strBrow,strPage,strEditboxName,strVal)
set oD = Description.create
oD("micclass").value = "WebEdit"
set strEbox = Browser(strBrow).Page(strPage).Chilobjects(oD)
For iCnt=0 to strEbox.count-1
strName = strEbox(iCnt).GetROProperty("name")
If strcomp(strName,strEditboxName,1) = 0 Then
strEbox(iCnt).set strVal
Exit for
End if
Next
End Function

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is synchronization? What are the ways you can synchronize?

753


How do know the number of browsers opened?

697


Hi frens! I am testing VB project with MS Access database. At add button click my record is storing in data table and it is shown in datagrid. So at Delete button click i want to check datagrid rows 9before and after delete). so how can i do it using descriptive programming?

1585


In QTP can we feed the out of one browser(internet explorer) as an input to the another browser(mozilla firefox)? If yes explain how to do it with an example.

1622


What are the main differences of qtp and win runner?

674






iam have done mba(finance)in 2008. in 2008 one reputed consultancy came off campus interview our institution. i got job as "manual test engineer". now iam working as "manual testing engineer". now my problem is when iam going interview the interviewer asking like " ur mba gradute how can u get job in test engineer." this question i have faced every interview. iam explaining how iam getting job. but they are not trust me". pls tell me answer how i am giving relavent ans.. this is my mail id y.ramana84@gmail.com

1489


What are the recording modes in qtp?

674


Name the different types of recording modes?

668


What is the difference between run time object and test object?

663


Explain the concept of object repository and how QTP recognizes objects?

637


What is the new version of qtp which is recently released in the market?

722


Hello friends..... On which areas of an application we can not test with QTP

1670


How you debug your script?

650


How to find operating system information using the qtp script?

685


What is reusable action?

691