Link to home
Start Free TrialLog in
Avatar of RWayneH
RWayneHFlag for United States of America

asked on

Dynamic array, when one of the items in the array is a link?

Hello, I have a line of VBScript that I performing weird on us.
Set obj = Browser("Haworth Lynx Order_1").Page("Haworth Lynx Pre-Order_2").WebTable("2660908").ChildItem(2,2,"Link",0)
obj.highlight
obj.Click

Open in new window


I was wondering if I can do the same thing, by using the following:
GetValuesFromRow=Browser("Haworth Lynx Order_1").Page("Haworth Lynx Pre-Order_3").WebTable("2014485").GetROProperty("column names")
strParts = Split(GetValuesFromRow, ";")

Open in new window


The array that is returned is a dynamic array.  Is there a way to Set an item in an array so it can be clicked on?
In my example, I would like to click on array item 2, whick is a link in a WebTable.  Is this possible?   Please advise and thanks.
Avatar of Norie
Norie

In the first set of code you are actually returning an object, which I assume is a link element on a web page.

In the second set of  code you appear to be splitting a string into substrings, you can't 'click' a string.

What is it you actually want to click?
Avatar of RWayneH

ASKER

The first code is unreliable, and I was trying to figure out a way to get the 2nd item in the array str (which is a link) clicked, or another way to write the first grp of code?  Not sure why it is unreliable, but for some reason the object does not get recognized and fails, even though it is in the object repository...  Sounds like getting a link click from an array is not possible?
If the array consists of strings it's not possible.
ASKER CERTIFIED SOLUTION
Avatar of RWayneH
RWayneH
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial