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

11 posts, 0 answers
  1. mohamedali
    mohamedali avatar
    9 posts
    Member since:
    Aug 2016

    Posted 03 Sep Link to this post

    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

     

     

     

     

     

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 07 Sep Link to this post

    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
     
  3. mohamedali
    mohamedali avatar
    9 posts
    Member since:
    Aug 2016

    Posted 07 Sep in reply to Elena Tsvetkova Link to this post

    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

     

  4. mohamedali
    mohamedali avatar
    9 posts
    Member since:
    Aug 2016

    Posted 08 Sep in reply to mohamedali Link to this post

    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

  5. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 10 Sep Link to this post

    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
     
  6. mohamedali
    mohamedali avatar
    9 posts
    Member since:
    Aug 2016

    Posted 12 Sep in reply to Elena Tsvetkova Link to this post

    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

  7. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 15 Sep Link to this post

    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
     
  8. mohamedali
    mohamedali avatar
    9 posts
    Member since:
    Aug 2016

    Posted 15 Sep in reply to Elena Tsvetkova Link to this post

    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

     

  9. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 20 Sep Link to this post

    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
     
  10. mohamedali
    mohamedali avatar
    9 posts
    Member since:
    Aug 2016

    Posted 21 Sep Link to this post

    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

     

  11. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    251 posts

    Posted 22 Sep Link to this post

    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
     
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!