What are tag paths used in DS finders?

Follow

Tag paths are what textually expresses the position of a tag within a page.

Below are explanations about different kinds of tag paths.


html.body.div.a

This indicates tag "a" which is inside tag "div", itself within tag "body", included in tag "html".

In the simple diagram below, 6 tags match the current expression.

mceclip0.png


 

html.body.div[1].a[0]

The number within[ ] is the tag path index (position number).

Because the tag path index starts at 0, the current tag path shows the first tag "a" within the second tag "div" of tag "body", itself included in tag "html".

 

In the simple diagram below, only 1 tag matches the current expression.

mceclip1.png



html.body.div[-1].a[-0]

When the index is negative, the tag is designated using backward counting.

The current tag path indicates the last tag "a" of the second last tag "div", itself included in tag "body", within tag "html".

 

In the simple diagram below, only 1 tag matches the current expression.

mceclip2.png

 

 

html.*.a

This is a very used tag path in robot creation.

" * " represents arbitrary strings of characters, applicable to all tags or indexes.

In other words, the current tag path represents all tags "a" inside tag "html", regardless of the intermediate path between "html" and "a" levels.

 

In the simple diagram below, 5 tags match the current expression.

mceclip3.png

 



html.*.a | div | td

“ | “ has the same meaning as "or".

In other words, the current tag path indicates either tags "a", tags "div" or tags "td" in lower levels under tag "html".

 

In the simple diagram below, 5 tags match the current expression.

mceclip4.png


For more about DS finders, please refer to "What are finders for action steps in DS?".

For more about how to configure finders, please refer to "How can I set DS finders in DS?".

 

 

 

Notes

You can create stable tag paths with " * " to address tags that can be altered with time or after changes to their pages.

However, the chances to find another tag by mistake increase.

Be careful both when handling " * " and when using defaults settings.

5 out of 6 found this helpful

Comments

0 comments

Article is closed for comments.