Micro Focus QTP (UFT) Forums
Inserting Enter operation into script - 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: Inserting Enter operation into script (/Thread-Inserting-Enter-operation-into-script)



Inserting Enter operation into script - Ravi_Chandra - 12-28-2010

Hi,

Can anyone help me for the below scenario:

I have to select a value from the drop down(DD1) and the selected value is dependent for some other drop down(DD2).
Like, When I select a value in DD1 then value in the DD2 should be refreshed. This is happening when I click Enter from Keyboard after selecting value from DD1.

Now, How can I insert the "Enter" operation into the script?

Plz help....

Regards,
Ravi.


RE: Inserting Enter operation into script - Saket - 12-28-2010

you can use SendKeys method or see if object.submit works for you.


RE: Inserting Enter operation into script - Ravi_Chandra - 12-28-2010

Hi Saket,

Tried with Submit... I got "Unspecified error"....

Below is the code i tried:

Code:
Browser("ABC").Page("XYZ").WebEdit("DD").Set "123"

Browser("ABC").Page("XYZ").WebEdit("DD").Submit

Actually here the issue is....
I have to select from the drop down... but when i added the object into repository then it is added as webelement instead as combobox.

Can you help me how to select the value from the drop down?

Thanks in advance,
Ravi.


RE: Inserting Enter operation into script - Saket - 12-28-2010

are you able to identify what type of control it is. I guess its not standard combobox, may be this could be reason its is identifying as Webelement. do you have dot net addin loaded?


Inserting Enter operation into script - Ravi_Chandra - 12-28-2010

no..

I do have .Net add in... but have Java, ActiveX, Web, Visual Basic and PeopleSoft add ins.

Please let me know whether the drop down box is not identifying only due to the add in issue?

Thanks,
Ravi.


RE: Inserting Enter operation into script - Saket - 12-28-2010

May be.. QTP is not able identify the control. try to find out what control it is.