Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RegEx in Object Identification
#1
Not Solved
Trying to store and click a link. This link can change and there can be similar links on the page (within the same column). How can I store the link value (i.e. save the current name of the link) and then click on it?

I've tried using "name:=[0-9]{6}" as a descriptive property value as well as using Record to find the link, and then add the same regex code into the name, outerhtml, and innerhtml descriptors.

None of this is working. Does anyone know how to find a dynamic link (or all of them that match), store it, and then click the link?

QTP 11
The link will always have 6 numeric digits.
Reply
#2
Not Solved
I had a similar issue with clicking a links in a webtable. I ended up pulling the name from the cell (getroproperty), storing the name in a variable (or datatable), and I had a generic link object that I assigned that name to, so it would click on the correct link.
Reply
#3
Not Solved
Do you happen to have an example of how this would all work together?

I've only used GetROProperty once, and it was getting a top-level item (link name), not an item nested in a web-table.

Pretty sure I could get the storing part, at least to a variable if not a datatable.

I'm no sure what you mean by having a "generic link object" and attaching the getropropty to it.
Reply
#4
Not Solved
'this is the column of the webtable that has the link in it - stored in the datatable
Code:
ncolumn = DataTable("Column_Testing", dtGlobalSheet)

'name of the link to click = cell value of top cell of testing column
'**********You may be able to substitute .getroproperty "name" (or whatever unique identifier) for getcelldata********
Code:
label = Browser("your browser").Page("your page").WebTable("Top Grid (date created and filter rows)").GetCellData(1, ncolumn)

'puts name of link in datatable
Code:
DataTable("Column_Name", dtGlobalSheet) = label

'name of column
Code:
Browser("your browser").Page("your page").Link("Column Name").Click
The last line is the generic link I was talking about. It is a link whose text property is the "Column_Name" of the datatable. All I have to do is put each column number in the datatable and it will automatically pull the name of the link from the first cell, and click the link with that name.

Basically this is an alternative to using regular expression and not exactly the same thing, so I am not sure if it will help. If you aren't using a table, you may be able to use getroproperty instead of getcelldata to get what you need.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Enabling Smart Identification for SAP Gui object prasanna.kale5@gmail.com 0 839 12-05-2019, 08:04 PM
Last Post: prasanna.kale5@gmail.com
  Object identification is taking too much time JACKSPARROW 0 1,586 01-17-2017, 11:08 AM
Last Post: JACKSPARROW
  Object Identification approach sams001 2 2,392 06-29-2016, 02:17 PM
Last Post: Ankesh
  Uft 12 - Identification of Google Chrome Object's Property value as plain text teja2730 0 2,453 02-02-2015, 05:22 PM
Last Post: teja2730
  Check Box Object Identification rakesh499 0 2,011 01-27-2015, 01:56 PM
Last Post: rakesh499

Forum Jump:


Users browsing this thread: 1 Guest(s)