Focus during real type and real click

4 posts, 0 answers
  1. Mark
    Mark avatar
    2 posts
    Member since:
    Nov 2012

    Posted 29 May Link to this post

    I am having issues with fields being focussed to the top underneath a DIV in our web app. Is this still the only solution?

     

    Posted 09 Dec 2015Link to this post
    Hello Uroš,

    This is a somewhat common problem. Your application has an overlay <div> element at the top of the browser window. Test Studio, when you have SimulateRealTyping, selected always wants to scroll the element to the top of the browser window in order to make sure it's visible in the browsers window before trying to type into the input box. Unfortunately in your case this has the side effect of scrolling it underneath your overlay div.

    The only way to over come this is to convert the step to code then comment out the ScrollToVisible line of code, like this:
    // Enter text 'passUser' in 'UsernameText'
    Actions.SetText(Pages.CAFFA.UsernameText, "");
    //Pages.CAFFA.UsernameText.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop);
    ActiveBrowser.Window.SetFocus();
    Pages.CAFFA.UsernameText.Focus();
    Pages.CAFFA.UsernameText.MouseClick();
    Manager.Desktop.KeyBoard.TypeText("passUser", 50, 100, true);
    The side effect is now you have to take extra care to insure the input box is visible before that step runs. Else typing won't go into that input field.

  2. Vera
    Admin
    Vera avatar
    0 posts

    Posted 30 May Link to this post

    Hello Mark,

    Thank you for contacting Telerik Support.

    The behavior of Test Studio has not been changed when Real User Actions are enabled therefore the target element is still scrolled to top. The only workaround we can provide is to convert the step to code and modify it as you have described.

    However, if you need further assistance do not hesitate to contact us again.

    Regards,
    Vera
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!Hello Mark,


  3. Mark
    Mark avatar
    2 posts
    Member since:
    Nov 2012

    Posted 30 May Link to this post

    That is *a lot* of test steps to convert. Any chance of adding an offset or something to assist in this area? We use bootstrap containers and this must be an issue quite a few people are running into. 
  4. Vera
    Admin
    Vera avatar
    0 posts

    Posted 31 May Link to this post

    Hello Mark,

    Thank you for getting back to us.

    We understand your concern but currently this is the only solution we can offer you.

    However, we have already logged a feature request regarding your question. You may check it out here and track its progress. You may also vote to increase the customer importance of the feature request.

    Let us know if you have further questions.

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