Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to select a whole paragraph and then the selected text of this paragraph appears in a text area. I tried many solution but it selects from middle to the end or middle to the start of the paragraph.

What I have tried:

I have this paragraph:
<pre>A paragraph is a self-contained unit of a discourse in writing dealing with a particular point or idea. A paragraph consists of one or more sentences. Though not required by the syntax of any language, paragraphs are usually an expected part of formal writing, used to organize longer prose.


Now i want to select this complete paragraph by using below code:

C#
Actions context = new Actions(driver);
context.MoveToElement(heading).ClickAndHold(heading).MoveByOffset(170, 55).KeyUp(OpenQA.Selenium.Keys.LeftShift).Release();


But this code select only that part of the paragraph which i underlined. Please help me to select the whole paragraph.
Thanks.
Posted
Updated 5-Dec-19 7:56am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900