Search code examples
teleriktestcompletegui-testing

Why does the browser zoom have to be at 100% for TestComplete and Telerick?


I was wondering why there is this limitation for both tools. I understand that it's needed to correctly identify web page elements and their position on web pages. My question is what is the underlying functionality that creates this limitation?

I should also say that I am asking this question because I see that TestComplete can identify objects by their name so why can't it use that?


Solution

  • TestComplete gets access to objects on a web page via internal browsers' APIs. These APIs return all information about an object including its position on the page without taking into account the zoom level. I suppose that TestComplete could try recalculating the coordinates of an object, but I doubt that it is possible to do this in absolutely the same way as a browser does and there will be a difference anyway.

    TestComplete needs to get an object's coordinates in order to work with the object due to the way it works: it simulates user actions over application. So, to click a button, TestComplete moves the mouse pointer to the corresponding point at the screen and invokes a mouse click event. This differs from the approach used by some other tools (e.g. Selenium) which just trigger objects' native events and not simulate a human user's mouse/keyboard activity.