Hello,
I’m new here. I’m trying to automate some work with ChatGPT. I’m stuck in trying to copy the output.
The output is a paragraph element within a div with an even number (see below). The divs in between (with odd numbers) are my prompts (my questions for ChatGPT. I don’t want to copy those. I just want to select the last paragraph or triple click the last div. I want to run it in a loop. Everytime I add a new prompt and ChatGPT responds a new div is added with the next even number (10,12,14,16,17,18, etc.)
Here’s a YouTube video of someone doing something similar with a different RPA tool.
https://www.youtube.com/watch?v=4tQ_tktIHQE
Their tool, however, has a selector called ‘last paragraph’ that selects the last paragraph element. I didn’t find anything like that in UIvision. I also tried storeXpathCount but it’s too complicated for my skill level.
I can use XClick with #tripleclick to click in the text or the div to select the text but I don’t know how to put the newest p element or the newest div into a variable to use it as a selector. And especially how to do this in a loop.
These are examples of divs that are the output of prompts 5,6,7 and 8.
//*[@id=“__next”]/div/div/main/div[1]/div/div/div/div[10]/div/div[2]/div[1]/div/div/p
//*[@id=“__next”]/div/div/main/div[1]/div/div/div/div[12]/div/div[2]/div[1]/div/div/p
//*[@id=“__next”]/div/div/main/div[1]/div/div/div/div[14]/div/div[2]/div[1]/div/div/p
//*[@id=“__next”]/div/div/main/div[1]/div/div/div/div[16]/div/div[2]/div[1]/div/div/p
//*[@id=“__next”]/div/div/main/div[1]/div/div/div/div[10]
//*[@id=“__next”]/div/div/main/div[1]/div/div/div/div[12]
//*[@id=“__next”]/div/div/main/div[1]/div/div/div/div[14]
//*[@id=“__next”]/div/div/main/div[1]/div/div/div/div[16]
So, I start ChatGPT and I ask
“how much is 2 plus 2?” <—this div is 1
ChatGPT reponds:
“2 plus 2 is equal to 4.” <—this is div 2
then I ask
“house in spanish” <—this div is 3
ChatGPT reponds:
"In Spanish, the word for “house” is “casa” <—this is div 4
So, I always want to copy the last output from ChatGPT.
Any ideas are appreciate!