How can I select a sentence from a text with protractor?

半城伤御伤魂 提交于 2019-12-11 16:58:39

问题


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:


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



来源:https://stackoverflow.com/questions/53319216/how-can-i-select-a-sentence-from-a-text-with-protractor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!