Exclude elements from RxPath?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
mrt
Posts: 257
Joined: Mon Mar 16, 2020 11:31 am

Exclude elements from RxPath?

Post by mrt » Mon Mar 13, 2023 2:57 pm

Dear folks,

is it possible to exclude certain elements from RxPath identification?

e.g. Searching for:

Code: Select all

//myitem
will find <myitem> in both cases:

Code: Select all

<body>
  ...
  <div[class~'CARD']>
    ...
    <myitem>

Code: Select all

<body>
  ...
    ...
    <myitem>
Can i tell RxPath to take only the element, which does NOT have a div[class~'CARD'] in its tree hiearchy?