Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
handling Autocomplete field using QTP11
#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


Messages In This Thread
RE: handling Autocomplete field using QTP11 - by supputuri - 06-06-2012, 10:57 AM

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

Forum Jump:


Users browsing this thread: 3 Guest(s)