Hi,
Summary
I want to use auto-pilot in a website to show a form modal and use CSS selector({site:text; selector=.name}) to retrieve info from the modal that its HTML is not included in the original web page where auto-pilot starts, but did not work.
The original web page shows a list of person and button for each to show a form modal to send message to them. I want to send a message to them one by one automatically.
Situation
The modal's HTML is not included (in the inspect view) in the web page where auto-pilot starts. During the auto-pilot, a button is clicked and the modal appears. Then, within the modal, CSS selector {site:text; selector=.name} runs to retrieve name shown in the modal, but [Error - No match found for selector: ".name ".]"Error: is output.
When I click the button and show the modal manually and run CSS selector within the modal (the modal's HTML is shown in the inspect view) CSS selector works, retrieving the name element from the modal.
I guess if you trigger CSS selector by auto-pilot, CSS selector loads HTML where auto-pilot starts.
Snippet:/auto-pilot
{repeat: 10}{key:tab}{endrepeat}
{click} #click the button to show the modal
Hi {site: text; selector=.name}, #retrieve info from the modal
Nice to meet you!
Output: [Error - No match found for selector: ".name ".]"Error:
I tried
I separated CSS selector part to another snippet and imported this snippet to the auto-pilot snippet but did not work, neither.
Snippet: /getname
{site: text; selector=.name}
Snippet: /auto-pilot
{repeat: 10}{key:tab}{endrepeat}
{click}
Hi {import: /getname},
Nice to meet you!
Output: [Error - No match found for selector: ".name ".]"Error:
Is there something else that I can try?