Skip to content
Discussion options

You must be logged in to vote

Apparently at the moment there is no built-in abstraction for this.
What I ended up doing is, as an example:

const text = await editor.getText();
const coordinates = findStringCoordinates(text, "my link text");
assert.ok(coordinates, "...");

 // Do not use moveCursor, it's slower
const [row, col] = coordinates;
await editor.setCursor(row, col);

// Select at least a character/word
await editor.getDriver().actions().keyDown(Key.SHIFT).sendKeys(Key.ARROW_RIGHT).perform();
const selection = await editor.getSelection();
assert.ok(selection, "missing editor selection");

// Pass the selection to click(...), otherwise nothing happens
await selection.getDriver().actions().keyDown(Key.CONTROL).c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lppedd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant