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

Invalid input type 'Tel' for this control. Control was expecting 'Text'

1 Answer 176 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 01 May 2019, 03:44 PM

I'm getting this error: 

Exception thrown executing coded step: 'Fill In Debit Card'.
Invalid input type 'Tel' for this control. Control was expecting 'Text'

when attempting to populate data in a field which for some reason is set up as TEL type.

Code below from website:

<input name="PaymentOptions.AccountNumber" aria-required="True" autocomplete="off" data-val="true" data-val-length="Please enter a valid account number, no longer than 8 digits." data-val-length-max="8" data-val-regex="Oops! Your account number should comprise only numbers. Please can you check it's correct? Thanks!" data-val-regex-pattern="^\d+$" data-val-required="Please enter an account number" id="AccountNumber" type="tel" value="">

 

This was working previous to the recent upgrade of Telerik - is there a way to fix this other than changing the web code to text type?

Could I revert to the previous version of Telerik? If so how do I do this?

Thanks

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 02 May 2019, 01:47 PM
Hello John,

The current forum thread duplicates a support ticket you have recently submitted and thus will be closed. 

However, I will also list below the proposed solution you confirmed is working to fix the error, so that this could be publicly available for other customers as well.

Thank you for your understanding in advance. 

Further notes and solution for error "Invalid input type 'Tel' for this control. Control was expecting 'Text'"

In our last release - 2019 R1SP (v.2019.1.408), which you had upgraded to, we had added support for input elements with type 'tel' (here are the release notes for the last official build) and probably this had affected your automation project.

Having that in mind, there is something you could give a try to and verify if it will fix the misbehavior. The actual change is that there is a new control type added in the Testing Framework, and the previously recorded elements are set with different control type, though. That mismatch is what causes the generated error and certainly will not be present in the previous version of Test Studio.

However, before you decide to roll back, can you, please try the following and let me know if the execution of the test in question is successful:
1. The element in code is referred from the Pages.gs.c file, so it is also available in the Elements Explorer.
2. Please, find the element, which generates the error (the target element of the failing step) in the Elements Explorer and open its properties from the right mouse button context menu.
3. The Properties pane is usually on the right side of the Test Studio window along with the Step builder.
4. The property, which needs to be changed, is the ControlType - the current set for the Card_Number element should be ArtOfTest.WebAii.Controls.HtmlControl.HtmlInputText.
5. In the dropdown for this property, you can find the ArtOfTest.WebAii.Controls.HtmlControl.HtmlInputTel , which should be selected for the current element.
6. Please, save the project, before you proceed.
7. Then, execute the test and verify if that change will allow the test to be executed.

Regards,
Elena Tsvetkova
Progress Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Jay
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or