Keyword Tests - Are there recommended best practices to make Keyword tests Resolution agnostic?
Are there recommended best practices to make Keyword tests Resolution agnostic? Let me give you some details.
We have a few Keyword scripts that utilize screen coordinates (i.e. - using the scroll bar to drag to the bottom of the screen).
When all our team were using the same monitor brand/model, we saw no issues when running on anyone's screens (Resolution 1680 x 1050 - Recommended).
We recently added a new team member who was issued a newer monitor (Resolution 1920 x 1080 - Recommended).
When running such scripts on his monitor we are getting failures to find the scroll bar, and if he updates the script to work on his monitor we are getting "out of the window bounds" errors when running on ours.
We attempted changing his resolution settings to match ours, but now his monitor is blurry. We could change out his monitors, but we fear boxing ourselves in and creating an update/upgrade fiasco down the line as monitors are replaced over time.
So - Are there recommended best practices to make Keyword tests Resolution agnostic? We imagine this issue has come up before.
Gang,
Thank you all for your suggestions. Max over at SmartBear Support suggested the following that worked very well on all monitor types we tried it on, and i wanted to share with you:
"I would suggest and the normally best way to use this scrollbar would be to use a method native to all browsers called "ScrollIntoView". To do this from a keyword test:
1. Under the operations section on the left of the keyword test, search for "On-Screen Action".
2. Manually add this operation (by dragging and dropping the operation) into the test.
3.A dialogue should appear. In this dialogue, select the object you would like to scroll to.
4. After selecting the object, select next.
5. On this screen, a list of methods should be available. Search for "ScrollIntoView", then select it.
6. Click Finish.
When this is done, TestComplete should automatically scroll to the object."
Team - again thank you for your time and suggestions. Wish I could have seen you all in Boston in April, but maybe next year.
Rich