Micro Focus QTP (UFT) Forums

Full Version: Selecting an iTem from the WebCombo box
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In my application, the webcomboBox would appear as webelement of the grid, but in clicking on the cell, the webelement would appear as "WebList", hence not able to choose a particular item from the web list. The code is provided as
Code:
Browser("XXXX").Page("XXXX").WebElement("html id:=ctl00xContentPlaceHolder1xUserControl1xGrid1xGrid_rc_0_11").Click
Browser("XXXX").Page("XXXX").WebList("html id:=ctl00xContentPlaceHolder1xUserControl1xGrid1xGrid_vl","name:=select").Select "Orange"

The QTP script runs without any problem, but the item is selected from the list
The QTP script runs without any problem, but the item is selected from the list
should it select ot Not?
(12-04-2009, 05:13 PM)nil Wrote: [ -> ]The QTP script runs without any problem, but the item is selected from the list
should it select ot Not?


Code:
Browser("XXXX").Page("XXXX").WebElement("html id:=ctl00xContentPlaceHolder1xUserControl1xGrid1xGrid_rc_0_11").Click
Browser("XXXX").Page("XXXX").sync
Browser("XXXX").Page("XXXX").WebList("html id:=ctl00xContentPlaceHolder1xUserControl1xGrid1xGrid_vl","name:=select").Select "Orange"
Check the above code

Thanks

~NileshTongue
as you have the statement to select a value from weblist, QTP will be selecting the value passed
I guess you want to retrieve the value from the grid.

if this is a grid your webelemnt must be within a webtable -
if so try with getcelldate once you identify the row

alternately if you want to get the selected value from weblist use getroproperty("value") or "Selection"
does the above code works.