Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
similar links
#1
Solved: 10 Years, 10 Months, 1 Week ago
I have multi-page tabular data that I am going through. At the bottom of the table is a list of pages (starting from 1 and going through 10). There is also a link "..." which means go to the next set of ten pages. So it
looks like this



1 2 3 4 5 6 7 8 9 10 ...

If you click on ... you get the next set with dots on each side (forward and backward):

... 11 12 13 14 15 16 17 18 19 20 ...

etc. At some point there will be no more pages forward so only the link to go backwards

... 21 22 23 24 25 26 27


I use the following to get the link number:
Code:
Dim obj_ChkDesc
Set obj_ChkDesc=Description.Create
obj_ChkDesc("Class Name").value = "Link"

I have a value for the current page which I increment and set like this

Code:
page=page+1
Obj_ChkDesc("name").value=page
If Browser("xALI Web").Page("xALI Web").link(obj_ChkDesc).Exist(1) then
    Browser("xALI Web").Page("xALI Web").Link(obj_ChkDesc).Click

if the page doesn't exist I set obj_ChkDesc("name") = "\.\.\." to get the
... link, and click.

This works as long as there is only one link with ...
(1 2 3 4 5 6 7 8 9 10 ...) but on pages where the ... is on both sides
(... 11 12 13 14 15 16 17 18 19 20 ... ) and I want to go forwards it tells me there are multiple links with the same value (...) and to give more properties.

How can I specify I want the right link of ... and not the left link? I did
google searches but it did not help.

As an aside when I get to
... 21 22 23 24 25 26 27

there is only one link but I do not want to click it because it will take me
back. I guess in the case of only 1 link I can see if there is a link '1' and if not, assume I am at the end.

But how can I disambiguate for the case

... 11 12 13 14 15 16 17 18 19 20 ...

?
Reply


Messages In This Thread
similar links - by bistritapcv - 04-24-2013, 03:37 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)