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

Focus during real type and real click

3 Answers 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 29 May 2018, 07:38 AM

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.

3 Answers, 1 is accepted

Sort by
0
Vera
Telerik team
answered on 30 May 2018, 08:41 AM
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,


0
Mark
Top achievements
Rank 1
answered on 31 May 2018, 12:55 AM
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. 
0
Vera
Telerik team
answered on 31 May 2018, 08:22 AM
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!
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Vera
Telerik team
Mark
Top achievements
Rank 1
Share this question
or