02-26-2013, 10:51 AM (This post was last modified: 02-26-2013, 11:03 AM by pradeep singh.)
Hi
There is a Select List in my application (basically it is a prime faces components). When I spy on it, it shows me as a 'Webelement' not a standard 'Weblist'. I told this one to my manager that instead of prime faces components ,we should use default Select menu . He told me we have to use prime faces components and try to find the other solution for it.
So please guide me how to deal with this situation. Please find the attached image . This same case is also with Radio buttons.
Loaded Addins are:
ActiveX
Java
Visual Basic
Web
QTP version: 11
OS : Windows 7
Browser: IE 9
Waiting for your solution as soon as possible...
Thanks & Regards
Pradeep Singh
Never Dealt with prime faces, but i think it is a known issue with QTP. How about click on the webelement and check the displayed dropdown. Is that recognized as a weblist?
If you dont find any valuable solution here, dont wait for long, talk to HP. There could be a patch or some kind of technical support.
Basanth Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Thanks for your quick reply...
Click on the webelement ,still displayed dropdown shown as webelement, not weblist.
Could you tell me please how to talk HP or what is the process for that ,if you know?
I have a doubt. If an application is developed in PHP, will the QTP support the Application without purchasing the licence.
As the QTP works good for ActiveX, Java, Visual Basic and Web applications.
One more doubt.
can we write the VB Script for printing the application form, which was developed in PHP
Hi,
As of now, QTP directly not recognizing to prime faces components, so don't wait long, Here is some work around so you may proceed your script development.
Suggested Approach : QTP recognize these object partially, so First you need to perform Click on Drop down list, Then Perform Click on options.
For more clarification, Refer to attached screenshot.
Step 1. Create a function
Step 2. Click on Label Webelement (so that list pop can open)
Step 3. Click on Webelement (The value to be select)
Code:
fnDivSelectList sDefaultValue,sValueToSelect
Function fnDivSelectList(sDefaultValue,sValue)
'++++++++++++++++++++++++++++++++++++++
' Function Description: This function will select the value from a list (Not Weblist ,but list under DIV as a Webelement)
' Author : Pradeep
' Date : 26- Feb-2013
' Input parameter : Default value of List,Value to be select
' Output :
' Remarks :
'++++++++++++++++++++++++++++++++++++++
Set olistLabel=Browser("title:=.*").Page("title:=.*").WebElement("html tag:=LABEL","innertext:="&sDefaultValue)
olistLabel.click
Set oListValue=Browser("title:=.*").Page("title:=.*").WebElement("html tag:=LI","class:=ui-selectonemenu-item.*","innertext:="& sValue)
oListValue.click