Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weblist selection
#1
Solved: 10 Years, 10 Months, 1 Week ago
Code:
browser("").Page("").weblist("customertype").
here i do have two customer types wholesaler and retailer. both have different steps and if i want to give if else condition here.
Code:
if customertype =wholesaler then do these steps
steps.............
else
these steps
steps.............
how can i give these steps please let me know
thanks

I tried this but not able to get
Code:
r=browser("").Page("").Weblist("customertype").GetROProperty("text")
if cutomertype=r
steps

else

steps

end if
Reply
#2
Solved: 10 Years, 10 Months, 1 Week ago
Hi there,
Try this,

Code:
Browser("..").Page("..").WebList("customertype").GetItem(1)
Set appropriate index for the customer from the Web List. And also I would look if the returned property from GetROProperty("text") is the right customer.

Thanks,
Reply
#3
Solved: 10 Years, 10 Months, 1 Week ago
Hello iam new to QTP trying out ,sorry but i did not understand your solution as what to do...please can you do it in detail and how to do that index please explain
Reply
#4
Solved: 10 Years, 10 Months, 1 Week ago
Please post your QTP script.
Reply
#5
Solved: 10 Years, 10 Months, 1 Week ago
Hello,

I have posted what i was trying in my question.if thats wrong i donno how to proceed so seeking help
Reply
#6
Solved: 10 Years, 10 Months, 1 Week ago
What do you get when your try to execute these two line.
Code:
r=browser("").Page("").Weblist("customertype").GetROProperty("text")
Msgbox r
Reply
#7
Solved: 10 Years, 10 Months, 1 Week ago
Try the below one,

Code:
Browser("").Page("").Weblist("customertype").Select Randomnumber(0,1)      'If you are having 2 dropdown value,QTP will select random one from that two value

wait 1

r=browser("").Page("").Weblist("customertype").GetROProperty("value")
if r="wholesaler" Then

steps

elseIf r="retailer"

steps

end if
Reply
#8
Solved: 10 Years, 10 Months, 1 Week ago
HELLO kalaivanna,

GOT it !!!!!!!!!!!!!!!!!!!!!

Thank you
Reply
#9
Solved: 10 Years, 10 Months, 1 Week ago
kalaivanna,

Good job.
Reply
#10
Solved: 10 Years, 10 Months, 1 Week ago
You are using 'GetROProperty("text")' when instead to get the current selected item in any list box you should use 'GetROProperty("value") or GetROProperty("selected").
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  WEBLIST shayk1985 3 5,344 05-17-2018, 11:49 AM
Last Post: Ankur
  Issue related to dropdown selection(Please help urgent) excellentpawan123 2 4,078 05-31-2014, 12:00 PM
Last Post: excellentpawan123
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,645 04-18-2014, 10:01 PM
Last Post: Parke
  Selection of sub menu in Windows Desktop application Shilpa859 0 2,317 10-17-2013, 06:39 PM
Last Post: Shilpa859
  Combo Box selection issue Shkumari 11 12,267 09-26-2013, 03:56 PM
Last Post: learnQtptips

Forum Jump:


Users browsing this thread: 5 Guest(s)