Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with the function that selects multiple items
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
I have written a function, which has parameters weblistname and value in the weblist.
It works for every item in the weblist.
I want to do multiple select what i am doing is

Code:
Call TypetoWebList("operatingSystems", "mac")
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^{DOWN}"
Call TypetoWebList("operatingSystems", "Windows")
WshShell.SendKeys "^{UP}"
    Set WshShell = Nothing
i want to press ctrl+down and ctrl+up
manually i can do by pressing shift key and selecting items.
my code is selecting individual items in the weblist.
i want to select multiple items.
Below is the code i have written
Public Function TypetoWebList(WebList_Name, strTypeinWebList)

Set WbList = Description.Create()
WbList("micclass").Value = "WebList"
WbList("name").Value = WebList_Name
Dim objAllWbList
Set objAllWbList = Browser("micclass:=Browser").Page("micclass:=Page").ChildObjects(WbList)
        AllWbList_Cnt = objAllWbList.Count
for i = 0 TO AllWbList_Cnt-1
                WbList_Name = objAllWbList(i).GetROProperty("name")

                If Trim(WbList_Name) = Trim(WebList_Name) Then
                        Dim strWbListOption, arrWbListOption
                        strWbListOption = objAllWbList(i).GetROProperty("all items")
                        arrWbListOption = Split(strWbListOption, ";")

                        For j = LBound(arrWbListOption) to UBound(arrWbListOption)
                                Print arrWbListOption(j)
                                
                                If  Trim(strTypeinWebList) = Trim(arrWbListOption(j))Then
                                        objAllWbList(i).Click
                                        objAllWbList(i).Select arrWbListOption(j)

                                        Exit Function
                                End If
                        Next
                        
                    Exit For
                End If
        Next

    End Function
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
hey Vijay44,
it seems all the threads below are related to the same issue.
Problem in selecting multiple items in the weblist
problem in wrting function
problem in implementing the keyboard inputs
right?
why are you creating multiple threads instead discussing it in the same?
why dont you try the solution provided there in other post?
do you need to test Ctrl up/down is working or not or you just need to select the multiple items?

Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,
I am extremely sorry for opening multiple threads of the same issue, i will make sure that, i will not open multiple threads of the same issue.
Regards;
Vijay
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem With conversion function wajid 3 1,747 10-01-2018, 01:16 PM
Last Post: wajid
  Unable to fetch items from WpfList in UFT saurabhkumar_gupta 0 2,453 03-08-2015, 09:17 PM
Last Post: saurabhkumar_gupta
  Can't locate items on Win7 Desktop RandomGrin 0 2,072 01-30-2015, 10:55 PM
Last Post: RandomGrin
  Calling a Function in Function Library when function is defined in an Action jitenderkkr 0 2,973 11-27-2014, 12:53 PM
Last Post: jitenderkkr
  Problem with Multiple rows retrieval from mySQL and save it some variable Dejavu 1 2,131 03-15-2013, 02:52 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)