Recently we received a query from a customer how could i check if the particular element is displayed in the web page or not.

We suggested them to use doesElementExist function for the above query. But in her case it always returned the Success. So we analyzed the problem and found the element she is referring is exist in the webpage, but its display property is toggled to show / hidden the element in the web page. If it is shown then the display property is block. If it is hidden display property is none.

Hence we thought to suggest her to use styleCheckInfo where it will validate the display property of the particular element and tell you whether the element is displayed or hidden in the web page.

Very recently in QEngine we given customization option to retrieve the style properties of the element from the web page. It will be huge to retrieve all the style properties of an element from the web page. Hence we thought to give the option to the user so that he can define whatever the properties he is interested in.

Hence under Recorder Settings we have given an option to define the style properties he interested to retrieve from the web page.

Coming back to the problem,

To validate an element is hidden in the web page use the following function,

styleCheckInfo("","display","none")

To validate an element should be visible in the web page,

styleCheckInfo("","display","block")

Hope this will be helpful to validate the element presence in the page.

Raghavan