This is a migrated thread and some comments may be shown as answers.

Simulate Real Typing on Android Web test

7 Answers 85 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
minh
Top achievements
Rank 1
minh asked on 03 Jan 2017, 09:06 AM

Hi,

I've encountered the problem with mobile test studio. Is there a way how to simulate real typing for mobile web testing ? Because as for now when i TAP a text field for password on connected Android Device a start typing it will make a test step action "SetValue". Because of that i am not able to log in a page because it's saying that the text field is required. But after manually taping the text field and type using the android keyboard i can log in as usual. 

7 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 03 Jan 2017, 09:36 AM
Hello Minh,

The easiest way how to achieve this is to locate the text field from the Test Studio Mobile Dom Explorer and create a type text step from the Step Builder.

In this case Test Studio will open the keyboard on your device and will type the text in the field.

Let me know if that helps.

Regards,
Boyan Boev
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
minh
Top achievements
Rank 1
answered on 03 Jan 2017, 10:03 AM

Unfortunately there is no option to type text from Step Builder.  Is there a way how to do this via Coded step ?. 

Thank you for response Boyan

0
Boyan Boev
Telerik team
answered on 03 Jan 2017, 11:51 AM
Hello Minh,

Please take my sincere apologies.

This type of steps should be done in a coded step. I assume that the text filed is already added into the Elements explorer so you can access it directly from Elements collection and type the text as follows:

 
this.ActiveDevice.Android.TypeText(Elements.YourView.YourTextBox, "text");

Here you can see a generic example of the TypeText method.

Let me know if hat helps.

Regards,
Boyan Boev
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
minh
Top achievements
Rank 1
answered on 03 Jan 2017, 12:07 PM

Hello,

 

This solution is also not working for me. When writing the code there is no option for (.Android) please bare in mind that i am trying to automate log in (WEB test) not android native. When typing this.ActiveDevice.(Web) there is no option for TypeText but only for SetValue which is not working also.

 

thank you

0
Boyan Boev
Telerik team
answered on 04 Jan 2017, 08:53 AM
Hi Minh,

In this case please insert a click or tap step for the text field before the set value step so you can enter in edit mode of the text field.

Let me know if that helps.

Regards,
Boyan Boev
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
minh
Top achievements
Rank 1
answered on 04 Jan 2017, 10:21 AM

Hi Boyan,

The problem with this solution is that whenever i use TAP action on the textfield it will not do anything with the textfield (meaning that taping textfield should show keyboard to type).

 

0
Boyan Boev
Telerik team
answered on 05 Jan 2017, 01:21 PM
Hi Minh,

The idea of inserting TAP or Click step before setting the value is to trigger the corresponding event. It seems the setValue step does not trigger that event. 

Please try inserting TAP and if that does not work insert a Click step before the SetValue step.

Another thing you can try is to execute the test with RunToHere to the SetValue step and double check whether the text is really entered. After that insert a TAP or Click step before SetValue step and execute both steps just for testing purposes.

Another thing that you can double check from the DOM explorer is whether the TAP step is executed on correct input of the site and against some other element.

The whole idea of those additional steps is to trigger the appropriate event which is normally triggered during the typing.

Let me know if that helps.

Regards,
Boyan Boev
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
minh
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
minh
Top achievements
Rank 1
Share this question
or