SMS Method

Applies to TestComplete 14.71, last modified on April 22, 2021

Description

Sends an SMS message to the specified phone number.

Declaration

AndroidDeviceObj.SMS(PhoneNumberMessage)

AndroidDeviceObj An expression, variable or parameter that specifies a reference to an AndroidDevice object
PhoneNumber [in]    Required    String    
Message [in]    Required    String    
Result None

Applies To

The method is applied to the following object:

Parameters

The method has the following parameters:

PhoneNumber

Specifies the phone number to send the message to.

Message

Specifies the text to be sent.

Result Value

None.

Remarks

This method is asynchronous. This means that TestComplete continues running the test, no matter whether it has finished or not. For information on how it may affect testing on Android devices, see Possible Issues.

Example

The following code demonstrated how you can send an SMS to the specified number:

JavaScript, JScript

Mobile.Device("MyDevice").SMS("3222322", "Hi there!");

Python

Mobile.Device("MyDevice").SMS("3222322", "Hi there!")

VBScript

Call Mobile.Device("MyDevice").SMS("3222322", "Hi there!")

DelphiScript

Mobile.Device('MyDevice').SMS('3222322', 'Hi there!');

C++Script, C#Script

Mobile["Device"]("MyDevice")["SMS"]("3222322", "Hi there!");

See Also

Testing Android Applications
Call Method
AndroidDevice Object

Highlight search results