TestProject Forum
Powered by leading experts in the test automation community

How to read and write the OTP by using Test Project?

Hi @amit.yahav,

This is Vijaya Bhaskar Borra.

While validating the TestProject tool for mobile testing, I faced the challenge of OTP extraction from SMS.

Could you please support me on how to resolve this issue.


Hi @vborra , thanks for reaching out.


The first input is the amount of time within test will wait for incomming sms (in millisecond)
So 10000 equals to 10 seconds

If we want to get code with action Get OTP by index :
Here’s our example message with code

“Your code is: 2443”
Index is the order of character in this text line.
So here our start index will be 14 (which is “2”). That is how we set FROM where to start.
And index 17 is “3” - this is our END.

So that way action will get sms and read it from character number 14 until 17.
Since counting here starts similar to how this works in programming , it starts from 0.