Standard Library
Built-in functions and modules for HellScript
Browser Actions
navigate(url: String)Navigate to a URL
click(selector: String)Click an element
fill_input(selector: String, value: String)Fill an input field
wait_for_selector(selector: String, timeout: Number)Wait for element to appear
wait_for_url_pattern(pattern: String)Wait for URL to match pattern
screenshot(filename: String)Capture screenshot
DOM Queries
query_selector(selector: String)Find first matching element
query_selector_all(selector: String)Find all matching elements
document.titleGet page title
document.urlGet current URL
element.innerTextGet element text content
element.getAttribute(name: String)Get element attribute
HTTP Client
import @stdlib/http
var response = http.get("https://api.example.com/data")
var data = response.json()
var post_response = http.post(
"https://api.example.com/create",
{ body: { name: "value" } }
)HTTP Methods
http.get(url: String, options: Object)http.post(url: String, options: Object)http.put(url: String, options: Object)http.delete(url: String, options: Object)String Utilities
string.toUpperCase()string.toLowerCase()string.trim()string.split(delimiter: String)string.contains(substring: String)string.replace(pattern: String, replacement: String)Array Utilities
array.lengtharray.push(item)array.pop()array.filter(predicate)array.map(transform)array.find(predicate)JSON Processing
var jsonString = '{"name":"value"}'
var parsed = JSON.parse(jsonString)
var object = { key: "value" }
var serialized = JSON.stringify(object)Console Output
console.log(message)console.error(message)console.warn(message)Timing
wait(milliseconds: Number)Sleep for specified duration
timestamp()Get current Unix timestamp
📚 Custom Modules
You can extend HellScript with custom modules written in Rust and compiled to WASM. See the module documentation for details on creating and publishing modules.