Micro Focus QTP (UFT) Forums
Selecting an iTem from the WebCombo box - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Selecting an iTem from the WebCombo box (/Thread-Selecting-an-iTem-from-the-WebCombo-box)



Selecting an iTem from the WebCombo box - MahalakshmiDevi - 12-04-2009

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


RE: Selecting an iTem from the WebCombo box - nil - 12-04-2009

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


RE: Selecting an iTem from the WebCombo box - Saket - 12-04-2009

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"


RE: Selecting an iTem from the WebCombo box - nil - 12-04-2009

does the above code works.