WORKING WITH QTP

TestEveryThinG

Get Max Length For Windows Edit Box (Single line edit box)

Posted by rajivkumarnandvani on May 10, 2008

”’  This Script for Check Max length In Edit Box (single line edit box ) With ussing  Maxlength Function

Set ObjName = Window(“Flight Reservation”).WinEdit(“Name:”)
Function Fun_maxlength (ObjName)
Dim m_counter
Dim  m_maxlength
Dim m_entervalue
m_entervalue=”a”
m_counter=0
Do
ObjName.set m_entervalue
m_value =ObjName.GetROProperty(“text”)
m_counter=m_counter+1
m_maxlength=len(m_value)
m_entervalue=m_value+”a”
Loop until (m_counter<>m_maxlength)
Fun_maxlength =m_maxlength
End Function

Advertisements

2 Responses to “Get Max Length For Windows Edit Box (Single line edit box)”

  1. Shreyya said

    Hi Rajiv,

    I find your blog very interesting and I have a question for you.

    How can i switch between different user accounts in windows using QTP / vbscripting?

    thanks a lot in advance !

  2. Hi Shereya,
    Thanks for that. I did not do this before if i get any info regarding i will update u.
    In case if you know that then you can share this.. this will help to others also..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: