Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get a index value of the webelement in runtime
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi All,

I am having a webtable inside a webtable i am having an webelement.

how to get the index of that webelement in runtime. The index is changing every time so i want get it in runtime.


Please help me


Thanks in advance,
Silpa.K
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Use GetToProperty("index")

Regards,
Ankesh
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
For this, you can use GetRowWithCellText method of WebTable.
Code:
B().P().WT().GetRowWithCellText("Search Text",Column number, StartFrom)

In "Search Text", give the Webelement's Text, so that it will find the Row Number.

Regards,
Uday
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Code:
Browser("micclass:=Browser").Page("micclass:=Page").WebElement("name:= name of the webelement").GetROProperty("index")
Reply
#5
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi
If u have same name for same object
use the concept of Index
for eg: U have sign up link in starting of an Inbox page and at the end of inbox page
then use index 0 for first and index 1 as for second sign up link.
I hope u got that
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  click each web link in a page using Index or other method in QTP smeijer 13 24,725 04-29-2017, 04:53 PM
Last Post: kowshik
Exclamation WebElement("WebElement").Click is not working sia sharma 7 23,959 09-28-2016, 08:58 PM
Last Post: supputuri
  Upgraded QTP 11.0 to UFT 11.53, Object Index Properties are varying Raghava M 0 2,184 01-28-2015, 06:02 PM
Last Post: Raghava M
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 5,077 12-20-2013, 01:44 PM
Last Post: sshukla12
  Unable to select a combo item by value or index martinshort 2 3,575 08-26-2013, 07:55 PM
Last Post: sudhirzpatil

Forum Jump:


Users browsing this thread: 5 Guest(s)