Selection Techniques - Partial Text Filter or RegEx Filter

Posted by Agung Pambudi in , ,

How can I add a Text Filter that matches a partial text or a pattern?

For example, if I wanted to capture the dimensions of a TV.

How could I create a text filter for an element that matches "TV (WxHxD)" or "TV without stand (WxHxD)"?
How could I create a text filter that contains a partial text like "TV" for a string "TV (WxHxD)"?
Could I run a RegEx to the Text Filter?
Check out the attached project

Templates: LG TVs\TVs\specs_tab\DIMENSIONS/WEIGHT
Element: Dimensions


You can use xpath function - contains:

//DIV[contains(UL[1]/LI[1], 'TV')]/UL[2]/LI[1]


The w3cschools will give you more details and plenty of examples.

No comments:

Post a Comment