Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem in selecting multiple items in the weblist
#1
Not Solved
Hi,
I have a weblist, i need to select multiple items in the weblist.
Manually i can do in the application by pressing shift key.

i am using the below code
Code:
Set WshShell = CreateObject("WScript.Shell")
        oPage.WebList("name:=operatingSystems").Click
        WshShell.SendKeys "{SHIFT}"
Browser("browser").page("page").WebList("name:=operatingSystems").Select datatable.Value("OperatingSystems",oSheetName)
    set WshShell = Nothing
The above code does not work. it does not select multiple items.
The datasheet column:operating system has values
windows and imac.

but the above code selects only windows, how to select multiple items.
Any help will be really appreciated.
Regards;
vijay
Reply
#2
Not Solved
is this the same issue in your earlier thread?

use 'ExtendSelect' method of weblist to select multiple items.

@Everyone - Please use proper formatting while posting. use tags to wrap your codes which makes it more readable.

Reply
#3
Not Solved
Hi Sanket,

Instead of weblist i had a webtable under which i have to select multiple webelement.Manually i am able to do it by pressing Control key+mouse click.But unable to perform the action with the help of QTP as extend select doesnt work for webtable.Kindly Guide.
Reply
#4
Not Solved
Hi,

Code:
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 1
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 2
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 3

this is the way you can select multiple options in List by using
--- ExtendSelect ---
Reply
#5
Not Solved
U can use select for the first case followed by extend select for the remaining extra selection of the objects.


Code:
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").Select 1
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 2
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 3

Correct me if wrong

Regards,
Sankalp
Reply
#6
Not Solved
Hi sshukla,

what ever u said above is correct and it wont be problem even if u use ExtendSelect

both the ways are correct

Code:
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 1
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 2
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 3
or

Code:
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").Select 1
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 2
Browser("Home").Page("Home").Frame("I1").WebList("lbSelColumns").ExtendSelect 3


Regards,
Gaveyom
Reply
#7
Not Solved
Ya its correct. it will work fine in both the ways.
But using select first followed by extend select is a better programing approach.

Correct me if wrong.

Regards,
Sankalp
Reply
#8
Not Solved
yes
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Webtable objects recognise as weblist in UFT 12.5 Sharad Kumar 0 1,170 12-06-2018, 04:57 PM
Last Post: Sharad Kumar
  Searching for and selecting row in Datawindow zsl0009 0 2,810 08-04-2015, 01:02 AM
Last Post: zsl0009
  Problem selecting in a dropdown menu during playback. qemls29 9 13,050 07-28-2015, 05:44 PM
Last Post: Sharan
  Unable to fetch items from WpfList in UFT saurabhkumar_gupta 0 2,451 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

Forum Jump:


Users browsing this thread: 1 Guest(s)