Micro Focus QTP (UFT) Forums
Looking for Help with webedit text - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Looking for Help with webedit text (/Thread-Looking-for-Help-with-webedit-text)



Looking for Help with webedit text - cris76 - 09-21-2011

This is my issue:

I'm scripting against a web application. The screen has 2 checkboxes and a webedit box.

If the 2nd checkbox is selected, when the value is TYPED into the webedit box, a 2nd object (drop down list of employers) is displayed.

If I use the Set command, the box does not appear. If I use Set and then click in the webedit and hit tab, it does not appear.

The only way to get the 2nd box to appear is if I physically type the value into the webedit object.

Is there a way, within QTP, to emmulate typing rather than using the Set Command?



RE: Looking for Help with webedit text - cris76 - 09-21-2011

Was able to solve my own problem.

Did a Click method on the field and then low level recording and manually entered the field. Granted, if I ever need to populate the field using the datatable, I'm not sure what I'm gonna do.


RE: Looking for Help with webedit text - Saket - 09-21-2011

try using 'Sendkeys' method in the edit box. here is an example -
Code:
Browser("").Page("").WebEdit("").Click
set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys("yourtext")
WshShell.SendKeys("{TAB}")
does this help?


RE: Looking for Help with webedit text - cris76 - 09-22-2011

I was looking at SendKeys as an option originally but didn't get it completely squared away. I was missing the set WshShell command *face palm*

Right now the low level recording is working fine with the Click method before; however, when they move forward and want something more dynamic from a datatable, I'll reference this.

Thanks!


RE: Looking for Help with webedit text - Saket - 09-22-2011

can you please make me clear on this
Quote:when they move forward and want something more dynamic from a datatable

sorry if I am missing anything.


RE: Looking for Help with webedit text - sumanjay - 09-12-2012

Yah that is ok, but when I am entering the text, it is being disappear, and webedit field is being blank, so how the text will be appear there and wait so that page will be refresh and tab function will perform, please reply as soon as possible.