Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing Index number of tables
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
I have 13 links on a page. When I select one of the links, a table opens with a set of new links. Each table that opens has all of the same attributes as the other 12 except the Index number. And, only onev table can be open at a time (opening a second table forces the first table to close)

Churently, I am setting myn table using this code:
Code:
Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type")
--- As the OR has the Index = 5)

Thus, the table where Index = 5 is always uses the 1st link's table links (even though the table is hidden).

In the OR, I tried to remove the Index from the Document Type(table) object, but I cannot.

The Index goes from 5, 7, 9, 11, ... , 29, 31.

How can I use DP (or any other method) to find the correct
"open" table?

I just tried
Code:
Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type", "Index = (Gr*2)+5)")
but no luck

In OR;
The Name of the object is Document Type
The name is ANNUAL SUMMARIES AND YEARLY TAX FORMS, but changes for each table
The text is "Document TypeDocument IDActions.ANNUAL SUMMARIES AND YEARLY TAX FORMSYETSBRGREB[Display] [Search] [Add Fav.]ASSET TRANSFER/401 NOTIFICATIONSASSETXFER2[Display] [Search] [Add Fav.]BRR CERTIFICATIONSBRR_CERTAB[Display] [Search] [Add Fav.]CLIENT CONFIRMATIONS - HISTORICALCONFIRMS2[Display] [Search] [Add Fav.]CLIENT CONFIRMATIONS - PRIOR 3 MONTHSCONFIRMS4[Display] [Search] [Add Fav.]CLIENT LETTERS AND DOCUMENTS BY ACCOUNTCLIENTDOCA[Display] [Search] [Add Fav.]COMMAND CHECK IMAGESWSTA_CAPCK[Display] [Search] [Add Fav.]CUSTOMER CHECKS BY ACCOUNT#CSDV_RPTS1[Display] [Search] [Add Fav.]STATEMENTS - HISTORICALFSTA_ACCTB[Display] [Search] [Add Fav.]STATEMENTS - PRIOR 13 MONTHSBROKERAGE7[Display] [Search] [Add Fav.] "
The Index is 5, 7, 9 ... 31

My code is:

Code:
For Gr = 1 to 13         'Loop thru GroupNames in Action1 file
            GroupName = DataTable.GetSheet("Action1").GetParameter("GroupName").ValueByRow(Gr)
            Browser("Wisdom").Page("WisdomLogin").Frame("parent").Link(GroupName).Click    

            'Find table to extract data from
            Set TableObj = Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebTable("Document Type", "name:=GroupName", "Index:= (Gr*2)+5)")
Next


thx

Lorena ;-)
Reply


Messages In This Thread
Changing Index number of tables - by mv8167 - 08-12-2011, 07:27 PM
RE: Changing Index number of tables - by luth - 08-17-2011, 04:57 PM
RE: Changing Index number of tables - by mv8167 - 08-17-2011, 07:12 PM
RE: Changing Index number of tables - by mv8167 - 08-24-2011, 02:01 AM
RE: Changing Index number of tables - by luth - 08-25-2011, 08:36 PM

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,688 04-29-2017, 04:53 PM
Last Post: kowshik
  Page element keep changing chong67 4 4,620 11-08-2016, 09:17 PM
Last Post: Paul Rammone
  Upgraded QTP 11.0 to UFT 11.53, Object Index Properties are varying Raghava M 0 2,180 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,062 12-20-2013, 01:44 PM
Last Post: sshukla12
  Unable to select a combo item by value or index martinshort 2 3,567 08-26-2013, 07:55 PM
Last Post: sudhirzpatil

Forum Jump:


Users browsing this thread: 1 Guest(s)