I have an Ionic/Angular app that reacts to text selections (e.g. for annotation in eBooks). The user can highlight text in the browser, and then a menu pops up (somewhat over-riding / augmenting the browser context menu) to allow actions. I would like to test that feature with testcafe. (The component rendering the text reacts to "selectionchange" events from the browser.)
There appears to be no way to simulate a text selection other than the Select Text command (https://devexpress.github.io/testcafe/documentation/test-api/actions/select-text.html), but this is limited to inputs, textareas, or contenteditables. My text is none of those - it's straight
elements.
Any suggestions on how this might be accomplished?