Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass index value run time.
#1
Not Solved
Hello,

I am writing script for a scenario where I need to pass the index value of object during runtime, but its not working.

Code:
index=value
browser("browser").page("page").objectname("index:=&value").submit
Above code is not working.Is there any alternative solution for this?

Thanks,
Girish
Reply
#2
Not Solved
Hi,

The double quotes are not used at right place. use this

Code:
browser("browser").page("page").objectname("index:="&value).submit

Regards,
Parminder
Reply
#3
Not Solved
Hi,

Thanks for the suggestion but its showing the run time error.

Regards,
Girish.
Reply
#4
Not Solved
In starting u r assigning the value to the variable index and later u r not using that variable to pass the value.
I should be like:
Code:
index=value
browser("browser").page("page").objectname("index:="&index).submit
Correct me if wrong.

Regards,
Sankalp
Reply
#5
Not Solved
Hi All,

Still I am getting the run time error.

Thanks.
Reply
#6
Not Solved
Hi,

It seems that the object has different index number than the one that you are providing. Try with some other index number.

If still not resolved then provide screenshot of OR and object spy.

Regards,
Parminder
Reply
#7
Not Solved
See boss, ur actual qstion is not clear....wat exactly u want???

1. u have a particular index value which u want to pass-on in run time???
2. Or u want to get the index value in run time and dat value u want to pass on??

If ur requirement is d first one then d code must work wat sshukla12 has posted. And if it is not working, d reason is u did not provide proper index value to identify dat object uniquely. Try with proper index value and it will definitely work....


But if ur requirement is the 2nd one, then it is not possible boss....coz to get d index value in run time u need to identify dat object uniquely in run time which is not possible widout dat index value....so how u will get index value by GetRoProperty("index")?????Its Not possible....In this case, come up wid ur need then i can try to help u out....


-------------
Thanx.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pass reference to datatable into function smallsteve 2 2,068 09-28-2017, 09:18 PM
Last Post: smallsteve
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,707 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
  Unable to click on the WebButton with specified Index srach84 2 4,291 03-31-2015, 04:36 AM
Last Post: srach84
  QTP is not identifying table with column names property but its identifing with index Anuradha B 1 2,997 02-12-2015, 04:00 PM
Last Post: Kirill
  HI, i'm having a run time error ,please help? Awzar 0 2,632 01-24-2015, 06:52 AM
Last Post: Awzar

Forum Jump:


Users browsing this thread: 2 Guest(s)