How can we search randomly for text like paragraph or image in the web page and get its attribute values.
A paragraph is taken as input with header and text is to be searched on page randomly. The Header and remaining text are placed under on parent div but the content in the header is under header tag and the remaining text under the div tag . So, how can we find the find the element with the entire paragraph and also get the attribute values.