Ask a Question

How to Add OCR Step into existing script

SOLVED
Jayanthsunkari
Occasional Contributor

How to Add OCR Step into existing script

Hello team,

 

I am working on mobile automation with  Testcomplete Image based process, now i want to include OCR step into existing script , could you please help me on adding OCR step into existing test

 

 

Case "Enter Text"
If(Typeofcall="Web") Then
if (InStr(1,strImageName,"OCR" ,1)>0) then
'OCR.Recognize Aliases.Device.Process_carrier_myinfinity.RootLayout.View_NO_ID.BlockByText strImageName.Touch
OCR.Recognize Aliases.Device.Process("air.com.carrier.myinfinity").View_NO_ID.BlockByText strImageName.Touch - i see error in this line 
if ((strImageName = "Username")or (strImageName = "Password")) Then
call oList.Touch()
'Mobile.Device.Keys()
'Mobile.Device.PressBack
Mobile.Device().Keys("")
Mobile.Device().Keys(stepdata)
Mobile.Device.PressBack
PerformStep="Text Entered"

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jayanthsunkari
Occasional Contributor

Re: How to Add OCR Step into existing script

i found solution for this issue , Thanks.

 

there is syntex error when we converted keyword test into script 

 

Below is the right syntex for the same.

 

OCR.Recognize (Aliases.Device.Process_carrier_myinfinity.RootLayout.View_NO_ID).BlockByText("demo").Touch

View solution in original post

1 REPLY 1
Jayanthsunkari
Occasional Contributor

Re: How to Add OCR Step into existing script

i found solution for this issue , Thanks.

 

there is syntex error when we converted keyword test into script 

 

Below is the right syntex for the same.

 

OCR.Recognize (Aliases.Device.Process_carrier_myinfinity.RootLayout.View_NO_ID).BlockByText("demo").Touch

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: