One more error

Call FieldValidation ("EditObject", 200)

i.e. EditObject is not variable. It will consider as string.


On Tue, Jul 30, 2013 at 2:01 AM, Anish Pillai
<[email protected]>wrote:

> Hi,
>
> 1) I see a syntax error ( double quotes is missing) in the following line
> -
>
> *Set  BrowserPage=Browser("title:=).Page("title:=")*
>
>
> 2) You have defined *Dim EditObject.* But its referencing an object
> WebEdit and not a variable.. So it should have been *Set EditObject*
>
>
>
> cheers, a
> QTP Automation Repository <http://www.automationrepository.com/>
>
>
> On Mon, Jul 29, 2013 at 7:00 PM, surabhi <[email protected]> wrote:
>
>> 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.
>>
>>
>>
>
>
>
> --
> Regards,
> Anish Pillai
> My QTP Blog <http://automationrepository.blogspot.com>
>
> --
> --
> 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.
>
>
>



-- 
Hoks

-- 
-- 
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