WORKING WITH QTP

TestEveryThinG

Work With text box( Windows WinEdit box) QTP

Posted by rajivkumarnandvani on May 3, 2009

In most cases, double-clicking on a data input field is the preferable method of selection; furthermore, it is usually necessary versus a single mouse click on the object. Double –clicking selects the all of the data in that field so that it can be replaced with the new data. A single- click operation, may only place the cursor in the input control , selecting none of the existing data and normally activates the insert mode . Not good. The existing data is not replaced with the new value. In some applications where multiple words or value separated by spaces can lives in a single edit box. We have found the even double-clicking may not get all of the text selected and ready for replacement. In this case, the method that consistently ensures that all of the data is selected is this: navigate to control via keyboard control, such as tabbing, right arrow or mouse click. Once the cursor is placed into the control, record these keystrokes:

Ctrl + Home
Ctrl + Shift + End
Delete

Like
Dialog(“Login”).WinEdit(“Agent Name:”).Type micCtrlDwn + micHome + micCtrlUp
Dialog(“Login”).WinEdit(“Agent Name:”).Type micCtrlDwn + micShiftDwn + micEnd + micShiftUp + micCtrlUp

Advertisements

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: