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

Changes are not reflected on saving the details due to binding issue

10 Answers 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
mohamedali
Top achievements
Rank 1
mohamedali asked on 03 Sep 2016, 08:49 AM

Hello,

I am using an application which is developed using Angular 2 and Kendo Components. The scenario is to edit the customer details (text box, drop down, checkbox) in a page and save the details. Objects are recognized and executed (such as enter input in text box, choose value in drop down, click save) as expected during playback, but the changes or modified details are not reflected on clicking save button. The same works well when I execute the scripts manually. This issue occurs in all the pages in application, as the events are triggered during playback due to two way binding issue.

I hope this is the same issue as mentioned in the following thread.

http://feedback.telerik.com/Project/161/Feedback/Details/194651-add-support-for-js-input-event

Though Telerik explicitly say that it supports Angular and Kendo, why the solution for this issue is not derived yet.

SimulateRealTyping is not the recommended option to go for. I tried with the code suggested by Stoil (from thread), but an error occurs on executing the script.

Script:
string text = "QA Text";
Actions.InvokeScript("angular.element(" + Pages.Retail.TitleText.ClientSideLocator + ").val('" + text.Replace("'", "\\'") + "').triggerHandler('input')");


Error Message: InError set by the client. Client Error: angular is not defined

Should I define or add references to angular elements before executing the scripts. Can you please help.

Regards
Mohamed

 

 

 

 

 

10 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 07 Sep 2016, 02:46 PM
Hello Mohamed,

Please let me know do you use the testing framework or the full version of Test Studio and which is the version you have currently installed? Additionally it will be of great help for us if you could provide your application or a sample page where you face the same behavior. 

Thanks in advance for the cooperation! I hope to hear from you soon! 

Regards,
Elena Tsvetkova
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
mohamedali
Top achievements
Rank 1
answered on 07 Sep 2016, 03:59 PM

Hi Elena,

Thanks for your reply. I use Test Studio R2 2016 trial version. I'm afraid I can't provide access over internet, as the application is installed in secured client machine.

 

As I said before, this has to be the same issue as posted in the below post.

http://feedback.telerik.com/Project/161/Feedback/Details/194651-add-support-for-js-input-event

 

Please let me know if you need further details.

 

Regards,

Mohamed

 

0
mohamedali
Top achievements
Rank 1
answered on 08 Sep 2016, 01:12 PM

Hi Elena,

I am facing the same issue in the following scheduler grid

http://demos.telerik.com/kendo-ui/scheduler/index

Scenario:

. Double Click on the tile "Alex's Birthday"

. Edit the title and click save button

. Note that the changes are not reflected

Regards

Mohamed

0
Elena
Telerik team
answered on 10 Sep 2016, 01:31 PM
Hi Mohamed,

The changes commented in the feedback you point to are included in our latest internal build from end of August. Please enable your Test Studio updater to check for internal builds as well (refer to the screenshot), upgrade to the latest available and give a try to the OnInput event. 

Please let me know if that works for you. 

Regards,
Elena Tsvetkova
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
mohamedali
Top achievements
Rank 1
answered on 12 Sep 2016, 02:51 PM

Hi Elena,

I have updated my build but the issue still occurs. The issue still could be recreated on the below page as well

http://demos.telerik.com/kendo-ui/scheduler/index

I have tried the event handlers before, unfortunately it doesn't help me.

Regards

Mohamed

0
Elena
Telerik team
answered on 15 Sep 2016, 12:56 PM
Hello Mohamed,

Please find attached a sample project against the demo page you shared executing a test as per the scenario you previously provided. The execution delay step at the end of the test is included to make visible that the change is reflected. Please give a try to it and if it cannot be executed on your end provide me the execution log

If this solution does not fit your requirements please provide me a sample project against the same demo page that does not meet your expectations so that I could test it on my end. 

Regards,
Elena Tsvetkova
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
mohamedali
Top achievements
Rank 1
answered on 15 Sep 2016, 02:07 PM

Hi Elena,

Unfortunately, the test project which you have shared with me doesn't work as expected. After changing the date, the Save button is not clicked instead the start date is changed again. I have attached test project that consists of your scenario and mine. I have included step by step snapshot in the word document along with execution log. Please find the attached.

I have executed the scripts in IE v11 and Chrome v53 browsers. I am using Windows 7 OS. Please let me know if you have any further questions.

Thanks

Mohamed

 

0
Elena
Telerik team
answered on 20 Sep 2016, 12:46 PM
Hello Mohamed,

You are right that the test was not working as expected and this is because of the find logic used for the elements. I have modified the find expressions accordingly and it now can be executed against any browser successfully. Please note that for some elements is used chained find expression. Very important note here is to set the enter text step and the click on the Save button as real user type and click since there are events related to those actions obviously which are triggered with real user actions. 

Please review the attached project and apply similar adjustment to your application tests. 

Regards,
Elena Tsvetkova
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
mohamedali
Top achievements
Rank 1
answered on 21 Sep 2016, 06:43 AM

Hi Elena

Thanks for your reply. I had already tried the 'SimulateRealTyping' option and I mentioned the same in my first post. As I said before, SimulateRealTyping is not a recommended option while designing a robust framework. There is high probability of script failure if any mouse movement occurs during test execution and moreover the execution time is increased with this option.

I was expecting a solution which overcomes this two-way binding issue without using SimulateRealTyping. Please let me know if there is any plan in future builds to resolve this issue.

Thanks

Mohamed

 

0
Elena
Telerik team
answered on 22 Sep 2016, 03:04 PM
Hi Mohamed,

If this real user actions trigger a javascript event you could try enable these with the actions available in the Step Builder. Since this will be related to you application specifics I cannot guarantee it will work for you but knowing the tested application you could give it a try. 

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