Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
handling Autocomplete field using QTP11
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hello!

I'm trying to automate an Automcomplete field. I'm suppose to write 2-3 letters and it will give a list and from within the list I've to pick one and click on "Submit" button.

I tried various ways to do so but had no luck Sad
A small intro of application
Applocation is developed in ADF (J2EE technology) and I'm automating the same using QTP11 and the application on IE9.


Appreciate all your help.
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
There are many ways to do this, below is one of them which i will recommend & was using.

Step1:Add the list object to OR and then add listitem object under list object. Make sure that you are able to identify the objects when it is displayed. Use innertext/Name property for the list item.
Step2: Now in the script use the settoproperty and set the value which you have to select.
Step3: Now check whether that listitem object exist or not. If the listitem object exist then select the item else write an error message.
please find the attached screenshot for OR related info, below is the code snippet

Code:
Browser("Combo Boxes").Page("Combo Boxes").WebEdit("CmbEditBox").Click
Browser("Combo Boxes").Page("Combo Boxes").WebEdit("CmbEditBox").Set "o"
Wait (5)
Browser("Combo Boxes").Page("Combo Boxes").WebElement("cmbList").WebElement("ListItem").SetTOProperty "innertext","ohio"
msgbox Browser("Combo Boxes").Page("Combo Boxes").WebElement("cmbList").WebElement("ListItem").Exist(0)


Attached Files Image(s)
   
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Autocomplete in QTP 10.0 branjitk 0 3,175 06-11-2012, 04:08 PM
Last Post: branjitk
  QTP11 is not able to record on windows application sowmya 3 3,801 02-24-2012, 09:52 AM
Last Post: sowmya
  QTP11.0 supports DB2. qtpexpert 2 3,424 12-15-2011, 02:44 PM
Last Post: qtpexpert
  Error Handling kanimozhi 4 5,311 02-26-2008, 05:52 PM
Last Post: deepakmehta82

Forum Jump:


Users browsing this thread: 2 Guest(s)