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

Test clicks fixed header instead of element

3 Answers 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jennifer
Top achievements
Rank 1
Jennifer asked on 15 Sep 2016, 07:36 PM
When a page has a fixed header, the click element step does not work. The browser scrolls the element to the top of the viewport, behind the fixed header, and the mouse click occurs on an element in the fixed header. I have attached a sample test for a public site with a fixed header.

3 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Petrov
Telerik team
answered on 16 Sep 2016, 03:30 PM
Hello Jennifer,

Thank you for your feedback and for the project.

The work around in this case is to convert the "Click" step into code and to comment the line containing ScrollToVisible in the code (it is usually the middle line as shown at the attached screenshot). 

Let me know if this works for you.

Regards,
Nikolay Petrov
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Jennifer
Top achievements
Rank 1
answered on 19 Sep 2016, 04:41 PM
The Edit In Code workaround worked. Is there any way to remove the ScrollToVisible by default when working with a site with a fixed header? It would be nice not to have to edit in code on each text or click step. Alternatively, maybe it could be added as a checkbox option in the step.
0
Nikolay Petrov
Telerik team
answered on 22 Sep 2016, 08:08 AM
Hello Jennifer,

There is no way to remove generally this option because it is a pro-active action. The ScrollToVisible is performed if you use option SimulateRealClick from the "Click" step properties. If you don't use this option it is not performed.

The problem in this case will be if you'll need this action despite the fixed header. Then you have to change the the scroll to be not to the top of the page but to its bottom.
Pages.TheCanterburyDictionaryOf.SubscribeLink.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementBottomAtWindowBottom);

I hope this explanation is helpful.

Regards,
Nikolay Petrov
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Jennifer
Top achievements
Rank 1
Answers by
Nikolay Petrov
Telerik team
Jennifer
Top achievements
Rank 1
Share this question
or