dialog.vbs (if you use teh function in QTP remove "WScript.")
Function GetChioce()
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate "C:\dialog.html"
Do While oIE.Busy Or (oIE.READYSTATE <> 4)
Wscript.Sleep 10
Loop
Do While oIE.document.getElementById("s1").selectedIndex = 0
Wscript.Sleep 10
Loop
GetChioce = oIE.document.getElementById("s1").selectedIndex
oIE.Quit
End Function
MsgBox GetChioce()
dialog.html
<select id=s1>
<option>Make your choice...
<option>1
<option>2
</select>
On Wed, Nov 26, 2008 at 5:47 AM, Lior <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm trying to display a user dialog with a list of several items.
> I need to "force" the user select one of the items, and pass the
> selected string \ value selected to a global variable
>
> does anyone have an idea how to implement this one?
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---