Test execution fails to select element on Ionic Popup dialogue

4 posts, 0 answers
  1. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 04 Dec 2015 Link to this post

    I have a web application built with http://ionicframework.com/. On the test execution there is a problem with element selection on pop-up message (see video in att.). Element is successfully validated if in Live mode and also Simulate real click is enabled on the test step.
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 07 Dec 2015 Link to this post

    Hi Uroš,

    I think I see the problem. Notice the size and location of the target element in the first attached screenshot. Notice that the size is superwide, much wider than the containing div its put inside of. Test Studio is asking the browser for the rectangular coordinates of the element and this is what the browser is telling us.

    The default behavior of Test Studio is to click on the absolute center of the target element as shown in the second attached screenshot. Unfortunately in this case the absolute center is outside of the containing div. All you need to do is to adjust the coordinates of the click as shown in the third attach screenshot.


    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Uroš
    Uroš avatar
    37 posts
    Member since:
    Dec 2013

    Posted 08 Dec 2015 in reply to Cody Link to this post

    Yes, adding the LeftCenter offset with 0,0 coordinates solved the issue. Thank you for assistance.
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 08 Dec 2015 Link to this post

    Hello Uroš,

    I'm glad I could help. I actually recommend setting the X value to a small positive number. By setting it to zero your instructing Test Studio to click on the exact edge of the element which may not work in all cases, all browsers. By setting it to a small positive number it will make Test Studio click just slightly to the right of the edge of the element which will be more reliable in all cases, all browsers.


    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top