Can I do content script and extract chat gpt responses? cuz I am doing a project which involves extracting chatgpt responses? But when I did it using js it tells the target element didnt exist even If the element exist before that code gets executed

// Evaluate the XPath expression to select the target paragraph element
const targetParagraph = document.evaluate(

// Check if the target paragraph element exists
if (targetParagraph) {
// Fetch the text content of the target paragraph element
const paragraphText = targetParagraph.textContent.trim(); // Trim to remove leading/trailing whitespace
console.log(“Paragraph text:”, paragraphText);
} else {
console.error(“Target paragraph element not found”);
//Here when i logged the document the element exist in that but i get only target element not found