I use the page object pattern and it's often the case, that I like to address an element inside another selector. So I would just like to reuse an already defined CSS-selector. My current workaround is just to define a plain string.
Is it possible to do something like:
const list = (listName) => Selector('#list' + listName)
const item = (itemName) => Selector(list, '#item-' + itemName)
It would be even enough to get the CSS-Selector text of the Selector like:
const list = (listName) => Selector('#list' + listName)
const item = (itemName) => Selector(`${list.selectorText} #item-${itemName}`)
Or that the find-method supports a Selector:
const list = (listName) => Selector('#list' + listName)
const item = (itemName) => list.find(Selector('#item-' + itemName))