Toggle navigation
Total Control
TC Games
TC Display
English
中文
English
Toggle navigation
Home
Download
Getting Started
Solution
Help
FAQ
How to Get Started
- Overview
- Control 1-2 Devices
- Control 4 Devices
- Control 10 Devices
- Control 20 Devices
- Control 30 Devices
- Control 50 Devices
- Control 70 Devices
- Control 100 Devices
Documentation
Overview
Test Execution
FindNode
FindNode Examples
AAIS
REST API
JS API
RingoJS
Price
JS API
Version:
10.0.u20
10.0.u11
10.0.u10
9.0.u50
9.0.u40
9.0.u30
9.0.u20
9.0.u12
8.0.u41
8.0.u30
8.0.u20
8.0.u10
7.0.0.u32
7.0.0.u31
7.0.0.u30
Download
×
JS API manual directory
Product Introduction
Total Control overview
Total Control JS API introduction
Usage notice
Beginner's guide
Install Total Control system
Connect phone via Total Control
Script executor for Total Control
Script Usage Guide
Compare JavaScript with REST API
How to set Show Coordinates in Total Control
How to use RingoJS built-in modules in Total Control
How to use JSC in Total Control
How to get messages in notification bar
How to add custom mothod for device object?
How to record scripts
How to create SCP file
How to use the public interface TCHttpRequest to send HTTP requests
Get device objects and properties [Device]
connectAll
:Automatic connection device
getMain
:Get the main device object
getAll
:Get all devices
getSelected
:Get all selected devices
searchObject(DeviceName)
: Get device object based on device name
Device.searchObject(tcConst.DevAll)
: Get all device objects
arrayOutput
: Multi-device return value and instructions for use
Device.searchObject(tcConst.DevGroup, GroupName)
: Get device based on the group name
Device.searchObject(tcConst.DevSerial,Serial)
: Get device based on the device serial number
Device.searchObject(tcConst.DevSelectMult)
: Get device based on multiple devices selected
Device.searchObject(tcConst.DevSelectOne)
: Get device based on a selected device
Device.searchObject(tcConst.DevSelectGroup)
: Gets all devices in the selected group
Get device properties
Device control interface [App]
closeApp
: [Multiple] Close the app
getActivity
: Get the current activity
getForegroundApp
: Get the app running in the foreground
getInstalledAPKList
: Get all installed apps
isAppForeground
: Whether the app runs in the foreground
installAPK
: [Multiple] Install the app to the device
openActivity
: Open the specified activity
restartApp
: [Multiple] Restart the app
runApp
: [Multiple] Run the app
uninstallAPK
: [Multiple] Uninstall the app
Device control interface [Color]
compareColor
: Compare the colors
compareColorEx
: (overload 1) Compare the colors
compareColorEx
: (overload 2) Compare the colors
getColorBits
: Get the color depth
getColorCount
: Get the number of colors
getPixelColor
: Get the color value of the coordinates
getPixelColorStr
: Get the color value
Device control interface [File]
cpFile
: Copy the file
doesExist
: Whether the file or folder exists
download
: [Multiple] Download the file
mvFile
: Move the file
readFile
: Read the file
renameFile
: Rename the file
rmDir
: Delete the folder
rmFile
: Delete the file
upload
: [Multiple] Upload files to the device
writeFile
: Write text content to the file
Device control interface [Image]
parseBMP
: Parse bmp image
screenshot
: [Multiple] Take a screenshot
screenshotClearMemory
: Clear data stored in memory
screenshotToMemory
: Take a screenshot and save to memory
screenshotToDevice
: Take a screenshot and save to device
seekImage
: Find the specified picture
seekImage
: (overload 1) Find the specified picture
seekImage
: (overload 2) Find the specified picture
seekImageByID
: Find a picture based on imageID
waitForImage
: Wait for the target image to appear
getData
: Get image data
Device control interface [Input]
click
: [Multiple] Send a click event
click2
: [Multiple] Randomly click on a coordinate
scroll
: [Multiple] Scroll the screen
send
: [Multiple] Send a phone button event
shift
: [Multiple] Shift event
swipe
: [Multiple] Swipe event
move
: [Multiple] Move pages according to system settings
Device control interface [Keyboard]
Up
control key ↑
Down
control key ↓
Left
control key ←
Right
control key →
shiftUp
control key Shift + ↑
shiftDown
control key Shift + ↓
shiftLeft
control key Shift + ←
shiftRight
control key Shift + →
pgUp
control key pgUp
pgDn
control key pgDn
shiftPgUp
control key Shift + PgUp
shiftPgDn
control key Shift + PgDn
Device control interface [OCR]
analyzeText
: Analyze screen text
getTextByBaiduCloudOnAndroid
: Identify the text
loginBaiduCloud
: Log in to Baidu Cloud
uploadTessData
: Upload the traineddata file
Device control interface [System]
adb
: Execute the specified adb command
displayMode
: Get the display mode
exec
: Execute commands on the device
get
: Get device properties
getAcceleration
: Get the rendering mode used by the device
getCursorPos
: Get the position of the mouse
getName
: Get the name of the device
getNo
: Get the serial number of the device
getOrientation
: Get the rotation direction of the device
getRemainingBattery
: Get the remaining battery
getSDPath
: Get the SD card directory path
getSetting
: Get properties of Total Control
getTmpPath
: Get the temporary file directory
getWidth
: Get the screen width value of the device
lock
: [Multiple] Lock the Total Control interface
set
: Set device properties
setName
: Set the name of the current device
sleep
: [Multiple] Sleep device
unlock
: [Multiple] Unlock the Total Control interface
wakeup
: [Multiple] Wake up the device
Device control interface [Texts]
getClipboardText
: Get the contents of the clipboard
inputText
: [Multiple] Text input
inputForm
: [Multiple] Text input
Device control interface [AAI]
FindNode
UI Explore for Total Control
UiSelector
getSetting
: Get the AAI status of Total Control
clickSync
: Click the button on the screen
inputTextSync
: Text input
runAppSync
: Start the app with the specified package name
restartAppSync
: Restart the app with the specified package name
sendAai
sendAai scene 1
: Get the node element according to the offset value
sendAai scene 2
: execute an action util the node appers
sendAai scene 3
: execute nodes according to classId, resoucreid, text, description values
sendAai scene 4
: How to get query more conveniently
UiElement.findObject
UiElement.findObjecs [Multi]
UiElementArray and application
addQueryListener
listQueryListener
deleteQueryListener
AAIS
Public interface [Excel]
cells
: Read data from the specified location
close
: Close the Excel document
Excel
: Create an Excel file object
get
: Get the data in the Excel table cell
getSheet
: Get the Excel worksheet object
getWorkbook
: Get Excel workbook objects
readExcel
: Read the contents of the excel document
save
: Save Excel document
set
: Change the contents of an Excel worksheet cell
setSheet
: Switch Excel worksheet
version
: Get Excel version
writeExcel
: Write the content to excel
Public interface [Keyboard]
delete
: Delete Keyboard object(Object member function)
Keyboard
: Create a new Keyboard object
searchObject
: Get Keyboard object(Non-object member function)
trigger
: Run shortcut function (object member function)
unregister
:Cancel shortcut(Non-object member function
unregister
: Cancel shortcuts(Object member function)
Public interface [MTE]
getContext
(Object member function)
getDevice
(Object member function)
getMessage
(Object member function)
getMessage
(Non-object member function)
getStatus
(Object member function)
getStatus
(Non-object member function)
name attribute
(Object member function)
runCTest
runDTest
setMessage
(Object member function)
setMessage
(Non-object member function)
setStatus
(Object member function)
setStatus
(Non-object member function)
stop
(Object member function)
Testrun
(Object member function)
Testrun.getContext
(Non-object member function)
Testrun.getDevice
(Non-object member function)
Testrun.stop
(Non-object member function)
MTE complete example
Public interface [Notification]
deleteListener
: Delete the listener function
getNotification
: Get the notification bar message
Notification
: Create a notification object
reset
: Reset the sequence number
setMatch
: Sets the match criteria for the message
setDevice
: Set the matching device
setApp
: Sets the app match criteria for the message
setListener
: Add a listener function
Public interface [System]
addDeviceFunction
: Custom device methods
addOutput
: Add text information to the pipeline
console.log
: Output formatted string
csCombineScripts
: Combine multiple recorded js scripts
define
: The properties of the specification script
delay
: Delay execution of the next statement
delDeviceFunction
: Delete the custom method
execCommand
: Execute the specified command
exit
: Terminate script execution
fileBinaryReader
: Get the binary content
fileTextReader
: Get the text content
format
: Format string
lastOutput
: Get the text information
lastError
: Get the most recent error message
print
: Output user-defined description information
printf
: Output formatted string
printVar
: Print the contents of the object
log
:Add log type and related description
rhinoRestart
: Restart the Rhino engine
scriptKill
: Stop the script executed
scriptKillAll
: Terminate all scripts
scriptList
: Get a list of scripts
scriptRun
: Run the script file
scriptWait
: Get the status of the script
tcLoad
: Load the specified JS and class file
TCgetAPIVersion
: Get the version number of the scrip
TCgetClipboardText
: Get the contents of the clipboard
TCgetLanguage
: Get the language
TCHttpRequest
: Request to specify a network
TCTimer
: Interval execution method
winInputText
: Enter text in the pop-up window
prompt
: Enter text in the pop-up window
winSelectButtons
: Button selection window
quit
: Exit script execution
sigmaLoad() & sigmaRun()
Public interface [Task]
taskCreate
: Create a script task
taskCreate
: (overload 1) Create a script task
taskDelete
: Delete the task
taskInfo
: Get the details of the task
taskList
: Get a list of tasks in the current executor
taskPause
: Pause the task
taskResume
: Resume the task
taskStop
: Stop the task
taskSet
: Set task parameters
Public interface [TCThread]
start
: Start the TCThread
stop
: Stop the TCThread
TCThread
: Create a TCThread
TCWait
: Wait for TCThread execution to complete
Public interface [Trigger]
deleteTrigger
: Delete the trigger
Public object structure description
Color
: Stores the member variables of the color objec
Coord
: Stores member variables for coordinate objects
ImageInfo
: Stores the member variables of the image
Preload script description
Preload the script by defining a profile
Sample script
Control multiple devices by device name.js
Run the app based on the message content.js
Save notification bar message.js
Get the specified point color.js
Determine if an app exists.js
Determine if the app is running in the foreground.js
Find images based on configuration files.js
Event trigger.js
Device disconnect and connection trigger event.js
disable
: Disable the trigger
seekColor
: Find colors in the specified area
enable
: Enable triggers
waitForColor
: Wait for the color to appear
getMode
: Gets the state of the event trigger
getName
: Get the name of the event trigger
getSubtype
: Get the event type of the trigger
list
: Get all trigger events
setCallback
: Add an event trigger listener function
setName
: Set the event trigger name
Trigger
: Create an event trigger object
A list of events supported by the trigger
We use cookies to personalize ads and improve your experience.
Read more
Do not use
Allow all