6 Answers, 1 is accepted
0
Hi Tiago,
The way your inquiry is written "Is there any way to validate the required fields on a form made in angularjs?" sounds more like something a developer would ask i.e. how do I do field valication in my AngularJS application.
Since this is the Telerik Test Studio public forum, did you mean how do you get Test Studio to validate these input fields? I will assume this and do my best to answer.
First Test Studio has no way of knowing which input fields are mandatory and which are not. It can only see what's present in the browsers DOM and this information is not present in the DOM. Only the web application (i.e. the code) has this information.
As far is validating, there are many different forms of validating. If you can concretely specify what validation you want Test Studio to perform on each field, then I can help you in designing a test script to do just that. Just saying "validate the required fields" is too vague and ambiguous to be able to provide a concrete answer.
Regards,
Cody
Telerik
The way your inquiry is written "Is there any way to validate the required fields on a form made in angularjs?" sounds more like something a developer would ask i.e. how do I do field valication in my AngularJS application.
Since this is the Telerik Test Studio public forum, did you mean how do you get Test Studio to validate these input fields? I will assume this and do my best to answer.
First Test Studio has no way of knowing which input fields are mandatory and which are not. It can only see what's present in the browsers DOM and this information is not present in the DOM. Only the web application (i.e. the code) has this information.
As far is validating, there are many different forms of validating. If you can concretely specify what validation you want Test Studio to perform on each field, then I can help you in designing a test script to do just that. Just saying "validate the required fields" is too vague and ambiguous to be able to provide a concrete answer.
Regards,
Cody
Telerik
0
Tiago
Top achievements
Rank 2
answered on 30 Mar 2015, 10:09 AM
I need validate riquired fields like this:
(the form was developed in angularJS)
(the form was developed in angularJS)
0
Hi Tiago,
Thank you for the screen shot. I see the form and the error messages in red. Now we need to more concretely define what exactly about this form do you want Test Studio to validate. That the error message appears? That the text is red? Or something else? Once we spell out exactly what is to be validated on this form then we can put together a test script that performs those steps.
Regards,
Cody
Telerik
Thank you for the screen shot. I see the form and the error messages in red. Now we need to more concretely define what exactly about this form do you want Test Studio to validate. That the error message appears? That the text is red? Or something else? Once we spell out exactly what is to be validated on this form then we can put together a test script that performs those steps.
Regards,
Cody
Telerik
0
Tiago
Top achievements
Rank 2
answered on 30 Mar 2015, 05:14 PM
Hi,
I need to validate the required fields are filled . If they are not filled need to know that not eestão completed and what are the fields where it happens .
I need to validate the required fields are filled . If they are not filled need to know that not eestão completed and what are the fields where it happens .
0
Hello Tiago,
Test Studio can only test one input field at a time. Verifying that an input field is not empty requires one line of code, like this:
Assert.IsTrue(Pages.TryitEditorV230.FrameIframeResult.Text.Value.Length > 0);
You will need to design a test that has N verifications like this, where N is the number of input fields you want to validate. I've attached a sample test as a demonstration.
Regards,
Cody
Telerik
Test Studio can only test one input field at a time. Verifying that an input field is not empty requires one line of code, like this:
Assert.IsTrue(Pages.TryitEditorV230.FrameIframeResult.Text.Value.Length > 0);
You will need to design a test that has N verifications like this, where N is the number of input fields you want to validate. I've attached a sample test as a demonstration.
Regards,
Cody
Telerik