How can I select a sentence from a text with protr

2019-08-27 16:13发布

I have to text a rich text editor using protractor. I want to select a sentence from the text and then click on the bold button to make this sentence bold.

I have tried some tests to select all the text, but it is not working. I am using a MAC computer.

browser.actions().keyDown(protractor.Key.COMMAND).sendKeys('a').perform();

How can I achieved it?

Thanks in advance.

1条回答
Evening l夕情丶
2楼-- · 2019-08-27 16:26

I think protractor-hotkeys package can help here. Let me know if you need some sample of it.

查看更多
登录 后发表回答