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

AttributeTypeDescription
typeintlisttype,0 - all environment,1 - enableenvironment,2 - disableenvironment

GetAttribute enum

Response enum

enable environment

Request path /environment/start

get attribute

AttributeTypeDescription
environmentIdStringenvironmentId

GetAttribute enum

Response enum

disableenvironment

Get path /environment/close

Get Attribute

AttributeTypeDescription
environmentIdStringenvironmentId
browserIdintbrowserId

GetAttribute enum

Response enum

Browser operate

Load url

get path /browser/loadurl

get attribute

attributetypedescription
browserIdintbrowserId
urlStringURL to be load
newTabboolopen new tab
timeoutinttimeout(seconds)

GetAttribute enum

Response enum

Switch tab

get path /browser/switchtab

get attribute

attributetypedescription
browserIdintbrowserId
urlStringThe first tab matched with the url
lastTabboolswitch to the last tab(true/false)

GetAttribute enum

Response enum

Close tab

get path /browser/closetab

get attribute

attributetypedescription
browserIdintbrowserId
urlStringThe first tab matched with the url
closeOthersboolclose all the tabs except the one matched(true/false)
closeLastTabboolclose the last tab(true/false)

GetAttribute enum

Response enum

setcookie

get path /browser/setcookie

GetAttribute

attributetypedescription
cookieStringcookie(json)

GetAttribute enum

Response enum

getcookie

get path /browser/getcookie

get attribute

attributetypedescription
browserIdintbrowserId

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

Response enum

getallcookie

get path /browser/getallcookies

get path

attributetypedescription
browserIdintbrowserId

GetAttribute enum

Response enum

clear cookies

get path /browser/clearcookies

get attribute

attributetypedescription
browserIdintbrowserId

GetAttribute enum

Response enum

get image

get path /browser/getimage

get attribute

attributetypedescription
browserIdintbrowserId
filePathStringsave to local path(png)
elementScreenshotboolget element screenshot(true/false)
searchElementObjectcondition of search element

GetAttribute enum

Response enum

Execute JS

get path /browser/executejs

Get attribute

attributetypedescription
browserIdintbrowserId
jsStringjs to be executed
inIframeboolexecute in jframe(true/false)
selectorForIframeStringfind 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

attributetypedescription
browserIdintbrowserId
searchElementObjectcondition of searchElement
saveElementNameStringAssign 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

attributetypedescription
browserIdintbrowserId
searchElementObjectcondition of searchElement
loopintloop time
sleepStringThe interval between each loop, in seconds

GetAttribute enum

Response enum

Scrape special text

get path /browser/scrapespecialtext

get attribute

attributetypedescription
browserIdintbrowserId
specialTextintspecial text,0 - source code,1 - title,2 - Body,3 - URL

GetAttribute enum

Response enum

Scrape One Text

get path /browser/scrapeonetext

Get Attribute

attributetypedescription
browserIdintbrowserid
elementNameStringSet the name of the element found after using the "find element" and "waiting for page load" methods to null when using searchElement
searchAllIframeboolSearch in all iframe along with elementName(true/false)
searchElementObjectcondition of searchElement. Set it to null when use elementName
propertyStringproperty name

GetAttribute enum

Response enum

Scrape some text

get path /browser/scrapesometext

get attribute

attributeTypeDescription
browserIdintbrowserid
searchElementObjectSelectorForSearchElement
propertyStringPropertyname

GetAttribute enum

Response enum

SetValue

get path /browser/setvalue

Get Attribute

AttributeTypeDescription
browserIdintbrowserid
elementNameStringSet the name of the element found after using the "find element" and "waiting for page load" methods to null when using searchElement
searchAllIframeboolSearch in all iframe along with elementName(true/false)
searchElementObjectcondition of searchElement. Set it to null when use elementName
propertyStringproperty name
valueStringvalue to be set

GetAttribute enum Get Attribute

Response enum

Keystrokesemulation

get path /browser/keystrokesemulation

get attribute

AttributeTypeDescription
browserIdintbrowserId
textStringtext
isSpecialKeyboolinput specialkey(true/false)
specialKeyintspecialKey,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
sendTimesintspecialKey send times
minIntervalintEnter the minimum interval event for each character, in milliseconds
maxIntervalintEnter the maximum interval event for each character, in milliseconds

GetAttribute enum

Response enum

Elementoperate

get path /browser/elementoperate

Get Attribute

AttributeTypeDescription
browserIdintbrowserId
elementNameStringSet the name of the element found after using the "find element" and "waiting for page load" methods to null when using searchElement
searchAllIframeboolSearch in all iframe along with elementName(true/false)
searchElementObjectcondition of searchElement. Set to null when using elementName
operateTypeintOperate type,0 - Event,eventName,1 - Click,2 - DoubleClick,3 - MouseClick,4 - MouseRightClick,5 - MouseDoubleClick,6 - MouseMove,7 - Touch,8 - ScrollTop,9 - ScrollBottom
eventNameStringEvent name, such as click, focus. Required when operateType is 0
moveTimeintThe duration of movement when operateType is MouseMove, in seconds

GetAttribute enum

Response enum

wahtsapp