MarketerBrowser API Doc

Base URL:http://127.0.0.1:39627/api

searchElementdescribe each attribute value of the parameter:

parent:find the name of the parent element of the element selector:find selectortext of the element isXPath:selector text is XPath(true/false) index:which index to choose when more than one element were found, start from "0" searchAllIframe:Search from Iframe(true/false) selectorForSearchIframe:Search Iframe for selector

Envirnoment operate

Get list

Request path /environment/list

Get attribute

Attribute Type Description
type int listtype,0 - all environment,1 - enableenvironment,2 - disableenvironment

GetAttribute enum

Response enum

enable environment

Request path /environment/start

get attribute

Attribute Type Description
environmentId String environmentId

GetAttribute enum

Response enum

disableenvironment

Get path /environment/close

Get Attribute

Attribute Type Description
environmentId String environmentId
browserId int browserId

GetAttribute enum

Response enum

Browser operate

Load url

get path /browser/loadurl

get attribute

attribute type description
browserId int browserId
url String URL to be load
newTab bool open new tab
timeout int timeout(seconds)

GetAttribute enum

Response enum

Switch tab

get path /browser/switchtab

get attribute

attribute type description
browserId int browserId
url String The first tab matched with the url
lastTab bool switch to the last tab(true/false)

GetAttribute enum

Response enum

Close tab

get path /browser/closetab

get attribute

attribute type description
browserId int browserId
url String The first tab matched with the url
closeOthers bool close all the tabs except the one matched(true/false)
closeLastTab bool close the last tab(true/false)

GetAttribute enum

Response enum

setcookie

get path /browser/setcookie

GetAttribute

attribute type description
cookie String cookie(json)

GetAttribute enum

Response enum

getcookie

get path /browser/getcookie

get attribute

attribute type description
browserId int browserId

|url|String|the specified website address of the cookie to be obtained|= GetAttribute enum

Response enum

getallcookie

get path /browser/getallcookies

get path

attribute type description
browserId int browserId

GetAttribute enum

Response enum

clear cookies

get path /browser/clearcookies

get attribute

attribute type description
browserId int browserId

GetAttribute enum

Response enum

get image

get path /browser/getimage

get attribute

attribute type description
browserId int browserId
filePath String save to local path(png)
elementScreenshot bool get element screenshot(true/false)
searchElement Object condition of search element

GetAttribute enum

Response enum

Execute JS

get path /browser/executejs

Get attribute

attribute type description
browserId int browserId
js String js to be executed
inIframe bool execute in jframe(true/false)
selectorForIframe String find selector in iframe

get attribute

GetAttribute enum

Response enum { "success": true, "result": null, "error": null, "browserNotFound": false}

Find Element

get path /browser/findelement

get attribute

attribute type description
browserId int browserId
searchElement Object condition of searchElement
saveElementName String Assign a name to the found element. Use the element by setting elementName in methods such as "grab text" and "set value"

GetAttribute enum

Response enum

Pageload wait

get path /browser/pageloadwait

get attribute

attribute type description
browserId int browserId
searchElement Object condition of searchElement
loop int loop time
sleep String The interval between each loop, in seconds

GetAttribute enum

Response enum

Scrape special text

get path /browser/scrapespecialtext

get attribute

attribute type description
browserId int browserId
specialText int special text,0 - source code,1 - title,2 - Body,3 - URL

GetAttribute enum

Response enum

Scrape One Text

get path /browser/scrapeonetext

Get Attribute

attribute type description
browserId int browserid
elementName String Set the name of the element found after using the "find element" and "waiting for page load" methods to null when using searchElement
searchAllIframe bool Search in all iframe along with elementName(true/false)
searchElement Object condition of searchElement. Set it to null when use elementName
property String property name

GetAttribute enum

Response enum

Scrape some text

get path /browser/scrapesometext

get attribute

attribute Type Description
browserId int browserid
searchElement Object SelectorForSearchElement
property String Propertyname

GetAttribute enum

Response enum

SetValue

get path /browser/setvalue

Get Attribute

Attribute Type Description
browserId int browserid
elementName String Set the name of the element found after using the "find element" and "waiting for page load" methods to null when using searchElement
searchAllIframe bool Search in all iframe along with elementName(true/false)
searchElement Object condition of searchElement. Set it to null when use elementName
property String property name
value String value to be set

GetAttribute enum Get Attribute

Response enum

Keystrokesemulation

get path /browser/keystrokesemulation

get attribute

Attribute Type Description
browserId int browserId
text String text
isSpecialKey bool input specialkey(true/false)
specialKey int specialKey,0 - TAB,1 - ENTER,2 - UP,3 - DOWN,4 - LEFT,5 - RIGHT,6 - HOME,7 - END,8 - PAGE UP,9 - PAGE DOWN,10 - BACKSPACE,11 - DELETE,12 - ESC
sendTimes int specialKey send times
minInterval int Enter the minimum interval event for each character, in milliseconds
maxInterval int Enter the maximum interval event for each character, in milliseconds

GetAttribute enum

Response enum

Elementoperate

get path /browser/elementoperate

Get Attribute

Attribute Type Description
browserId int browserId
elementName String Set the name of the element found after using the "find element" and "waiting for page load" methods to null when using searchElement
searchAllIframe bool Search in all iframe along with elementName(true/false)
searchElement Object condition of searchElement. Set to null when using elementName
operateType int Operate type,0 - Event,eventName,1 - Click,2 - DoubleClick,3 - MouseClick,4 - MouseRightClick,5 - MouseDoubleClick,6 - MouseMove,7 - Touch,8 - ScrollTop,9 - ScrollBottom
eventName String Event name, such as click, focus. Required when operateType is 0
moveTime int The duration of movement when operateType is MouseMove, in seconds

GetAttribute enum

Response enum

wahtsapp