All,

I am trying to validate if a field, which is a textbox, accepts 200 
characters. So I have the below code and it pops error at EditObject field 
saying "object doesn't support property or method". Does anyone have any 
idea as to where I am going wrong?

Dim EditObject
Set  BrowserPage=Browser("title:=).Page("title:=")
EditObject =  BrowserPage.WebEdit ("name:=string_10E.*", "type:=textarea")
Call FieldValidation ("EditObject", 200)

Function ValidateTextboxMaxLength(oEditObject,oMaxLen)  
   
Dim wsh  
Dim oMaxStr  
Dim iValue  
   set wsh=CreateObject("wscript.shell")  
   
    oMaxStr=string(oMaxLen+1,"t")  
    oEditObject.Set "&oMaxStr"  
    oEditObject.Click  
    wait(1)  
    wsh.SendKeys oMaxStr  
    iValue=oEditObject.GetROProperty("value")  
   
    If len(iValue)=oMaxLen then  
       Msgbox "yes"
Call WritePassLog (LogFile,  "RR#26140 &RR#26149: &Passed")
        else  
Msgbox "no"
  Call WriteFailLog (LogFile,  "RR#26140 &RR#26149: &Failed")
    End If  
    Set wsh= nothing  
   
End Function  

Thanks,
Surabhi

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to