Create objects with pseudo elements ::before or ::after

Hello,

I would like to create objects with pseudo elements «::before» or «::after».

I tried multiple things but none of the solutions seems to work

  • Pseudo element in xPath : id("foo")::before
  • Pseudo element in object's tag property: li::before
Can someone help me please ?