Prompt and Simulang of the most commonly-used workflow components
The best way to master Simular Pro is to learn from the example instructions (prompts) and corresponding Simulang on this page.Just run the instructions on your Simular Pro to reproduce similar Simulang code, or copy the Simulang code on this page and directly execute.Find out how to:
Most of the Simulang code on this page were generated in one shot from the instructions.
Since there may be differences in individual machine configurations (e.g. browser settings), we recommend that you double check the Simulang before executing.
If Simular Pro did not click on an element you intended, try these various methods for element localization.
Many workflows start with extracting information from an application or webpage.
Moreover, the extracted information often needs to be represented in a particular structure.
For example:
A house on sale has the following fields: address, square footage, number of beds and baths, etc.
An email has these fields: sender address, time sent, title, etc.
Community and communication applications: Extracting channel names on a desktop community app
Copy
Open DiscordGet the page content and extract the top 10 server names visible in the left sidebar.Do not include direct messages.
Show Simulang
Copy
function main() { // Open Discord open({app: "Discord"}); let servers = []; // Get page content and analyze servers var content = pageContent(); // Extract list of servers from the sidebar var serverList = ask({ prompt: "List the top 10 Discord server names visible in the left sidebar. Do not include the direct messages. Return as JSON array. Do not say anything else.", context: content }); servers = JSON.parse(serverList); return servers;}
Shopping: Get all store locations of a grocery chain
Copy
Go to Wegmans stores webpage.Get all the locaitons and print them out.
Show Simulang
Copy
function main() { // Open Wegmans stores webpage open({url: "https://www.wegmans.com/stores"}); wait({waitTime: 2}); // Get page content and extract all locations var content = pageContent(); var locationsResponse = ask({ prompt: "Extract all store locations from this page. Return a JSON array of location names (cities/towns where Wegmans stores are located). Do not say or explain anything else, just return the requested data.", context: content }); var locations = JSON.parse(locationsResponse); // Print out all locations console.log("Wegmans Store Locations:"); for (let i = 0; i < locations.length; i++) { console.log(`${i + 1}. ${locations[i]}`); } return {status: "completed", totalLocations: locations.length, locations: locations};}
Social media URL scraping: Get a company’s social media URLs
Copy
Go to simular.aiGet all of their social media URLs and print them out
Show Simulang
Copy
function main() { // Go to simular.ai open({url: "https://simular.ai"}); wait({waitTime: 3}); // Get page content const content = pageContent(); // Ask for social media URLs with explicit JSON format request const result = ask({ prompt: "Find all social media URLs on this page (Twitter, LinkedIn, YouTube, Facebook, Instagram, Discord, etc.). Return as a JSON array of URLs only. Do not say or explain anything else, just return the requested data.", context: content }); // Parse the JSON response const socialMediaUrls = JSON.parse(result); // Print out all social media URLs console.log("Social media URLs found on simular.ai:"); for (const url of socialMediaUrls) { console.log(url); } return {success: true, socialMediaUrls: socialMediaUrls};}
Go to techcrunch, get all the news headlines, and print them out.
Show Simulang
Copy
function main() { // Open TechCrunch website open({url: "https://techcrunch.com"}); wait({waitTime: 3}); // Get page content const content = pageContent(); // Ask LLM to extract all news headlines const headlinesResponse = ask({ prompt: "Extract all news headlines from this TechCrunch page. Return only a JSON array of headline strings. Do not include any other text or explanation.", context: content }); // Parse the JSON response const headlines = JSON.parse(headlinesResponse); // Print out all headlines console.log("TechCrunch News Headlines:"); console.log("=========================="); for (let i = 0; i < headlines.length; i++) { console.log(`${i + 1}. ${headlines[i]}`); } return {success: true, headlinesCount: headlines.length};}
Investing: Get an investment firm’s list of portfolio companies
Copy
Go to a16z's portfolio page and get all the features company names on the page.
Show Simulang
Copy
function main() { // Open Chrome and navigate to a16z portfolio page open({url: "https://a16z.com/portfolio"}); let allCompanies = new Set(); // Get current page content let content = pageContent(); // Extract visible company names let response = ask({ prompt: "This is the a16z portfolio page. List all visible featured portfolio company names on the page. Do not include a16z itself or any navigation elements. Return as JSON array of strings. Do not say or explain anything else, just return the requested data.", context: content }); allCompanies = JSON.parse(response); // Convert to sorted array and display results let sortedCompanies = Array.from(allCompanies).sort(); console.log(`Found ${sortedCompanies.length} featured companies on a16z's portfolio page:`); console.log(sortedCompanies.join("\n")); return { success: true, totalCompanies: sortedCompanies.length, companies: sortedCompanies };}
Email management: Get the sender, date, and summary of the first unread email.
Copy
Go to gmail.comClick the first unread emailFrom the email content, get: sender email address, date, summary of topic
Show Simulang
Copy
function main() { // Go to Gmail open({url: "https://gmail.com"}); wait({waitTime: 3}); // Click the first unread email clickFirstUnreadEmail(); // Get email information let emailInfo = getEmailInfo(); // Output the results console.log(`Sender Email: ${emailInfo.senderEmail}`); console.log(`Date: ${emailInfo.date}`); console.log(`Summary: ${emailInfo.summary}`); return emailInfo;}//@ Click the first unread emailfunction clickFirstUnreadEmail() { let content = pageContent(); let firstUnreadEmail = ask({ prompt: "Find the first unread email in the inbox and return its subject line or identifying text that can be clicked. Return only the clickable text, nothing else.", context: content }); click({concept: firstUnreadEmail}); wait({waitTime: 2});}//@ Get email information including sender, date, and summaryfunction getEmailInfo() { let content = pageContent(); let emailData = ask({ prompt: "From this email content, extract: 1) sender email address, 2) date of the email, 3) a brief summary of the topic/subject. Return as JSON with keys 'senderEmail', 'date', 'summary'. Do not say or explain anything else, just return the requested JSON data.", context: content }); return JSON.parse(emailData);}
Real estate: Get address, number of bedrooms and bathrooms, square footage, and price of homes in Palo Alto
Copy
Go to redfin palo alto zip 14325Get all the address, number of bed, number of bath, square feet, and price of the houses
Show Simulang
Copy
function main() { // Open Chrome and go to Redfin Palo Alto open({app: "Google Chrome"}); wait({waitTime: 2}); // Navigate to Redfin Palo Alto press({key: "l", cmd: true}); type({text: "redfin.com/city/14325/CA/Palo-Alto", withReturn: true}); wait({waitTime: 3}); // Get all house listings data let houseData = getHouseListings(); // Log the results console.log("House listings in Palo Alto:"); for (let i = 0; i < houseData.length; i++) { console.log(`House ${i + 1}:`); console.log(`Address: ${houseData[i].address}`); console.log(`Bedrooms: ${houseData[i].bedrooms}`); console.log(`Bathrooms: ${houseData[i].bathrooms}`); console.log(`Square Feet: ${houseData[i].squareFeet}`); console.log(`Price: ${houseData[i].price}`); console.log("---"); } return {status: "completed", houses: houseData};}//@ Get all house listings with address, bedrooms, bathrooms, square feet, and pricefunction getHouseListings() { // Get page content let content = pageContent(); // Ask LLM to extract house data let result = ask({ prompt: "Extract all house listings from this Redfin page. For each house, get: address, number of bedrooms, number of bathrooms, square feet, and price. Return as a JSON array with objects containing fields: address, bedrooms, bathrooms, squareFeet, price. Do not say or explain anything else, just return the requested JSON data.", context: content }); let houseData = JSON.parse(result); return houseData;}
Go to simular.ai/blogGet all the blog post URLsFor each blog post URL, open it, extract the post title and a short summary, then close the tab.Print out the post titles and summaries.
Show Simulang
Copy
//@ Go to simular.ai/blog and get all blog post URLsfunction getBlogPostUrls() { open({url: "simular.ai/blog"}) wait({waitTime: 3}) var content = pageContent() var result = ask({ prompt: "Find all blog post URLs on this page. Return as a JSON array of complete URLs only. Do not say or explain anything else, just return the requested data.", context: content }) return JSON.parse(result)}//@ Extract title and summary from a blog postfunction extractPostInfo(url) { open({url: url}) wait({waitTime: 3}) var content = pageContent() var result = ask({ prompt: "Extract the blog post title and create a short summary (2-3 sentences) of the main content. Format as a JSON object with fields 'title' and 'summary'. Do not say or explain anything else, just return the requested data.", context: content }) return JSON.parse(result)}function main() { // Get all blog post URLs var blogUrls = getBlogPostUrls() var allPosts = [] // Process each blog post for (var i = 0; i < blogUrls.length; i++) { var url = blogUrls[i] // Extract title and summary var postInfo = extractPostInfo(url) postInfo.url = url allPosts.push(postInfo) // Close the current tab press({key: "w", cmd: true}) wait({waitTime: 1}) console.log(`Title: ${postInfo.title}`) console.log(`Summary: ${postInfo.summary}`) console.log(`URL: ${url}`) console.log("---") } return { success: true, posts: allPosts }}
The sections above show you how Simular Pro can read structured information and repeats a task on 100 webpages - now you need it to write that valuable information somewhere.
This section shows you many options to write structured output to a local file on disk or a web browser application.If you cannot find an output format you need, just ask us on Discord.
Open a new Google SheetAdd headers Name, Summary, DateWrite "Simular", "Simular pro can do anything!", "08/30/2025" into the first row.
Show Simulang
Copy
function main() { // Create a new Google Sheet open({url: "https://sheets.google.com/create"}); wait({waitTime: 2}); // Add headers setGoogleSheetCellValue({cell: "A1", value: "Name"}); setGoogleSheetCellValue({cell: "B1", value: "Summary"}); setGoogleSheetCellValue({cell: "C1", value: "Date"}); // Add data to the first row (row 2, since row 1 has headers) setGoogleSheetCellValue({cell: "A2", value: "Simular"}); setGoogleSheetCellValue({cell: "B2", value: "Simular pro can do anything!"}); setGoogleSheetCellValue({cell: "C2", value: "08/30/2025"}); return {success: true};}
Open a new blank sheet in ExcelAdd headers Name, Summary, DateWrite "Simular", "Simular pro can do anything!", "08/30/2025" into the first row.
Show Simulang
Copy
function main() { // Open Excel and create a new blank sheet open({app: "Microsoft Excel"}); // Create new blank workbook press({key: "n", cmd: true}); wait({waitTime: 2}); // Add headers in the first row click({concept: "cell A1"}); type({text: "Name"}); press({key: "tab"}); type({text: "Summary"}); press({key: "tab"}); type({text: "Date"}); // Move to the second row and add the data click({concept: "cell A2"}); type({text: "Simular"}); press({key: "tab"}); type({text: "Simular pro can do anything!"}); press({key: "tab"}); type({text: "08/30/2025"}); return {success: true};}
Sometimes, the basic click({at: <description of some element>}) may not be enough for Simular Pro to identify a unique element.
This may happen when more than one element share the same text description, or when the target element only has a visual label (e.g., image or icon).
In these cases, you have two options:
In Settings, enable vision fallback for the click action. Simular Pro will automatically attempt to use the best method for UI localization.
Use more precise inputs to the click function, as shown by examples below.
You can find the full specification of inputs to the click function here.
Use the element picker tool to check the text description of your target element.
Clicking one of multiple elements that have the same description or image.
This pattern is a powerful and fast way to localize a target element whose textual description may not be unique:
Copy
click({ at: <something not unique>, spatialRelation: <a comma-separated string of spatial relationships>, anchorConcept: <something unique>})
You may use one from each of the following three spatial relation categories for spatialRelation:
distance: closest, furthest
positional filters: left, right, above, below,
containment filters: contains, containedIn
For example, this will find the unique element called “link Introduction” that is above of and closest to a unique element called “heading Simular Pro”:
Go to docs.simular.aiClick on Introduction closest to Getting StartedClick on Introduction closest to Simular BrowserClick on Introduction closest to Agent SClick on Introduction closest to Simular Pro
Show Simulang
Copy
function main() { // Go to docs.simular.ai open({url: "https://docs.simular.ai"}); // Click on Introduction closest to Getting Started click({at: "Introduction", spatialRelation: "closest", anchorConcept: "Getting Started"}); wait({waitTime: 1}); // Click on Introduction closest to Simular Browser click({at: "link Introduction", spatialRelation: "below,closest", anchorConcept: "heading Simular Browser", mode: "anchorGrounding"}) wait({waitTime: 1}); // Click on Introduction closest to Agent S click({at: "link Introduction", spatialRelation: "above,closest", anchorConcept: "heading Simular Pro (Private)", mode: "anchorGrounding"}) wait({waitTime: 1}); // Click on Introduction closest to Simular Pro click({at: "link Introduction", spatialRelation: "below,furthest", anchorConcept: "link Blog", mode: "anchorGrounding"}) wait({waitTime: 1}); return {success: true};}
When attempting to close a popup window, you may need to distinguish between the close button of the popup window and the close button of the outer application.
You can instruct Simular Pro to click the close button contained in the dialog window.
Use the element picker tool to get the description of the anchor element.
Copy
Click the close button contained in the group dialog.
Show Simulang
Copy
function main() { Click({ at: "button close", spatialRelation: "containedIn", anchorConcept: "group dialog Find and replace" });}
Clicking on an element using both text and screenshot
If neither specifying spatial relations nor pure vision work, you may need a combination of both to localize an element.
The mode textAndScreenshot is able to localize any element that has a text description.
Copy
click({at: <description of element>, mode: "textAndScreenshot"})
You may use any natural language for the description of the element, including any referring expressions (e.g., “link Introduction in the Simular Browser section”)
Copy
Open docs.simular.aiClick the introduction link in the simular browser section
Show Simulang
Copy
function main() { open({url: "https://docs.simular.ai"}) click({at: "link Introduction in the Simular Browser section", mode: "textAndScreenshot"})}