|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to use SendKeys for a ListBox in a Web Application?I'm completely new to QTP and VBScript. I'm working on a Web Application. What I need to test is as follows: In a web-page, I need to test whether by clicking the [DOWN]arrow, the items in a listbox scroll-down. Any help in modifying the logic shown below would be appreciated: Sub ListBoxCheck(Window_Object, ListBox_Object) Dim objShell Set objShell = CreateObject("WScript.Shell") Array = Split(ListBox_Object.GetROProperty("all items"),";") i=0 Do While i <= UBound(Array) Window_Object.Activate ListBox_Object.Focus objShell.SendKeys "{DOWN}" objShell.SendKeys "{ENTER}" If ListBox_Object.GetROProperty("value") <> Array(i) then Report Error End If i=i+1 Loop End Sub Thanks... You should probably ask this in a VBScript group. Try this one:
news://news.microsoft.com/microsoft.public.scripting.vbscript |
|||||||||||||||||||||||