Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weblist selection
#1
Solved: 11 Years, 4 Months, 3 Weeks 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: 11 Years, 4 Months, 3 Weeks 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: 11 Years, 4 Months, 3 Weeks 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: 11 Years, 4 Months, 3 Weeks ago
Please post your QTP script.
Reply
#5
Solved: 11 Years, 4 Months, 3 Weeks 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: 11 Years, 4 Months, 3 Weeks 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: 11 Years, 4 Months, 3 Weeks 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: 11 Years, 4 Months, 3 Weeks ago
HELLO kalaivanna,

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

Thank you
Reply
#9
Solved: 11 Years, 4 Months, 3 Weeks ago
kalaivanna,

Good job.
Reply
#10
Solved: 11 Years, 4 Months, 3 Weeks 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,655 05-17-2018, 11:49 AM
Last Post: Ankur
  Issue related to dropdown selection(Please help urgent) excellentpawan123 2 4,311 05-31-2014, 12:00 PM
Last Post: excellentpawan123
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,866 04-18-2014, 10:01 PM
Last Post: Parke
  Selection of sub menu in Windows Desktop application Shilpa859 0 2,449 10-17-2013, 06:39 PM
Last Post: Shilpa859
  Combo Box selection issue Shkumari 11 12,881 09-26-2013, 03:56 PM
Last Post: learnQtptips

Forum Jump:


Users browsing this thread: 1 Guest(s)