BotreamDocs Website Türkçe v0.1.1

Web commands

browser · capture

browser Browser

Manages browser sessions.

Actions (--action)

--action:open
ParameterValueDefaultDescription
--urltext
--browserone of default, chrome, edge, firefoxdefaultBrowser to open; 'default' uses the agent machine's default browser
--headlesstrue / falsefalse
--outputvariable nameVariable for this browser; other web commands target it with --browser:$name$
--action:navigate
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--url requiredtext
--action:scroll

Turns the mouse wheel over the middle of the page, as the user would (pages that load more as they scroll react too).

ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--amount requirednumberWheel notches: positive scrolls up, negative down (one notch is about 100 pixels)
--action:close
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--action:refresh
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--action:back
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--action:forward
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--action:screenshot
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--screenshot requiredtextScreenshot file path A file on the agent machine.
--action:getcurrenturl
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--output requiredvariable nameVariable that receives the result
--action:gettitle
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--output requiredvariable nameVariable that receives the result
--action:executejs
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--script requiredtext
--outputvariable nameVariable that receives the result
--action:newtab

Opens a new tab in the browser; the following commands act on it.

ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--urltext
--action:switchtab

Makes another tab (or pop-up) of the browser the one commands act on; --browser:$variable$ then means that tab.

ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--titletextTitle of the tab (wildcards: *Invoice*)
--urltextAddress of the tab (wildcards: *orders/new*); used with or instead of the title
--timeoutnumber30Timeout in seconds
--action:closetab

Closes the current tab; the previous one becomes current.

ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--action:gettabs

The tabs of the browser as records (Title, Url, IsCurrent).

ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--output requiredvariable nameVariable that receives the result
--action:ondialog

How alert, confirm and prompt dialogs of pages are answered from now on. Without this command they are dismissed (Cancel).

ParameterValueDefaultDescription
--accepttrue / falsetruetrue answers OK, false Cancel
--texttextText typed into prompt dialogs
--action:getlastdialog

The message of the last dialog a page showed.

ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:getcookies

The cookies of the browser as records (Name, Value, Domain, Path, Expires).

ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--output requiredvariable nameVariable that receives the result
--action:setcookie
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--name requiredtext
--value requiredtext
--domaintextSite the cookie belongs to; the current page's site when empty
--pathtext/
--action:clearcookies
ParameterValueDefaultDescription
--browser$variable$Browser from browser --action:open --output (default: the page used last)

Examples

browser --action:open --url:"https://example.com" --output:session
browser --action:navigate --url:"https://other.com"
browser --action:close
browser --action:open --url:"https://shop.example.com" --output:shop
browser --action:open --url:"https://erp.local" --output:erp
capture --browser:$shop$ --action:gettext --dompath:"#price" --output:price
capture --browser:$erp$ --action:settext --dompath:"#amount" --value:$price$
browser --browser:$shop$ --action:close
browser --action:newtab --url:"https://example.com/orders"
browser --browser:$shop$ --action:switchtab --title:"*Invoice*" --timeout:10
browser --action:switchtab --url:"*orders/new*"
browser --action:closetab
browser --action:gettabs --output:tabs
browser --action:ondialog --accept:true --text:"duplicate order"
browser --action:getlastdialog --output:message
browser --action:setcookie --name:session --value:$token$ --domain:"example.com"
browser --action:getcookies --output:cookies
browser --action:clearcookies

capture Capture

Interacts with a web page element.

Parameters of every variant

ParameterValueDefaultDescription
--window$variable$Browser window by title (a set --type:window variable); used when --browser is not given
--browser$variable$Browser from browser --action:open --output (default: the page used last)
--dompath requiredtextXPath or CSS selector
--frametextSelector of the iframe the element is in, e.g. #payment; nested frames as outer >> inner. The page itself when empty
--propertiestextObject properties of the captured element. Every checked property must match; the selector is built from them
--anchortextSelector of a nearby element that does not change (a label, a heading); among several matches of --dompath the one closest to it is used
--anchorpositionone of near, right, left, below, abovenearWhere the element is, seen from the anchor: the closest match on that side is used
--fallbacktextOther selectors to try when the first finds nothing, separated by " || ". Alternatives from the properties table are tried after them by themselves
--timeoutnumber30Timeout in seconds
--retrynumberNumber of retry attempts. When not set, screen and file commands try once more after a passing problem (a page still loading, a covered element, a locked file); 0 turns that off
--retryintervalnumber1Seconds between retries

Actions (--action)

--action:click

No further parameters.

--action:doubleclick

No further parameters.

--action:rightclick

No further parameters.

--action:clear

No further parameters.

--action:check

No further parameters.

--action:uncheck

No further parameters.

--action:hover

No further parameters.

--action:focus

No further parameters.

--action:submit

No further parameters.

--action:scrollto

No further parameters.

--action:waitfor

No further parameters.

--action:settext

Replaces the text of a field (formerly: type).

ParameterValueDefaultDescription
--value requiredtext
--action:appendtext

Adds text after what a field already holds.

ParameterValueDefaultDescription
--value requiredtext
--action:scroll

Turns the mouse wheel over the element: for lists, panels and tables that scroll inside the page.

ParameterValueDefaultDescription
--amount requirednumberWheel notches: positive scrolls up, negative down (one notch is about 100 pixels)
--action:sendkeys

Focuses the element and presses keys there, as the keyboard would: text, special keys and shortcuts.

ParameterValueDefaultDescription
--keys requiredkeysText and special keys in brackets, e.g. [TAB], [ESC], [CTRL+A], [DOWN][ENTER]. Use [[ for a literal [
--action:select

Selects an option of a drop-down list by its value or text.

ParameterValueDefaultDescription
--value requiredtext
--action:selectindex

Selects the option of a drop-down list at a position.

ParameterValueDefaultDescription
--index requirednumberPosition of the option: 1 = first
--action:getproperty

Reads a property, a state (visible, enabled, checked), the selected option or the position of the element.

ParameterValueDefaultDescription
--property requiredtextvalue, text, visible, checked, selectedtext, x, … or any attribute
--output requiredvariable nameVariable that receives the result
--action:setproperty
ParameterValueDefaultDescription
--property requiredtextvalue, text, innerhtml or any attribute
--value requiredtext
--action:getattribute
ParameterValueDefaultDescription
--property requiredtextAttribute name
--output requiredvariable nameVariable that receives the result
--action:gettext
ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:exists
ParameterValueDefaultDescription
--output requiredvariable nameVariable that receives the result
--action:gettable

Reads an HTML table into a datatable variable: capture the table, one of its cells, or an element that contains it. Loop over the rows with loop --type:datatable.

ParameterValueDefaultDescription
--headertrue / falsetrueThe header row (thead, else the first row) names the columns; false: Column1, Column2… and every row is data
--output requiredvariable nameVariable that receives the result
--action:extract

Reads repeating items (product cards, search results, list rows) into a datatable: --dompath matches every item, each column reads one value inside an item, and --next turns the pages. Made with the Extract data wizard.

ParameterValueDefaultDescription
--columns requiredtextThe columns as JSON: [{"name":"Title","path":".//h3","read":"text"}]. path is relative to the item (. is the item itself); read is text, value, href, src, html or any attribute name
--nexttextSelector of the Next page button or link: after a page is read it is clicked, until it is missing or disabled. One page when empty
--maxpagesnumber10Pages to read at most (with --next)
--maxrowsnumber0Rows to read at most; 0 reads all
--output requiredvariable nameVariable that receives the result
--action:screenshot
ParameterValueDefaultDescription
--path requiredtextScreenshot file path A file on the agent machine.
--action:upload

Chooses files for an upload: on a file input, or on the button that opens the file dialog.

ParameterValueDefaultDescription
--file requiredtextFile to upload; several separated by commas A file on the agent machine.
--action:download

Clicks the element and saves the file the site then downloads; --output receives the saved file.

ParameterValueDefaultDescription
--path requiredtextFile to save as, or a folder (the site's file name is used) A file on the agent machine.
--outputvariable nameVariable that receives the result

Examples

capture --action:click --dompath:"//button[@id='login']"
capture --action:settext --dompath:"//input[@name='email']" --value:"user@test.com"
capture --action:getproperty --dompath:"//h1" --property:text --output:pageTitle
capture --action:select --dompath:"//select[@id='country']" --value:"Turkey"
capture --action:selectindex --dompath:"//select[@id='country']" --index:2
capture --action:appendtext --dompath:"#note" --value:" (urgent)"
capture --action:getproperty --dompath:"#agree" --property:checked --output:agreed
capture --action:exists --dompath:"//div[@class='error']" --output:hasError
capture --action:click --frame:"#payment" --dompath:"#pay"
capture --action:upload --dompath:"input[type=file]" --file:"C:\a.pdf, C:\b.pdf"
capture --action:download --dompath:"#export" --path:"C:\Downloads" --output:file
capture --action:gettable --dompath:"#orders" --output:orders
capture --action:extract --dompath:"//div[@id='results']/ul/li/div" --columns:[{"name":"Title","path":".//h3","read":"text"},{"name":"Price","path":".//span[@class='price']","read":"text"},{"name":"Link","path":".//a","read":"href"}] --next:"//a[normalize-space()='Next']" --maxpages:10 --output:products
Botream 0.1.1 · Generated 2026-10-14