Micro Focus QTP (UFT) Forums
How to reduce the execution time of script involving innertext in webelement - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: How to reduce the execution time of script involving innertext in webelement (/Thread-How-to-reduce-the-execution-time-of-script-involving-innertext-in-webelement)



How to reduce the execution time of script involving innertext in webelement - priyaang - 03-30-2014

Hi,

I am using QTP 11 trial version, IE8 and Windows 7 in QTP automation.

In the application there are validations which involves comparing Innertext of webelements. The initialization script is Action and rest of the files (Function libraries and test case) are in .VBS format. While executing the test script, for each test step that is executed the control goes to the Global function .vbs file and the innertext of the webelement is obtained using "getroproperty".
Code:
Set oObject = Browser("").Page("").Webelement("")
tet = oObject.getroproperty("innertext")
.....I notice that at this particular step, its taking a real long time to get the innertext.

In the OR, I capture html id, html tag, innertext for webelements and the innertext has values (89.09, 87.00). So inorder to make the object applicable to all values. I made innertext as .*(regular exp).
Smart identification is "ON".

I referred some articles on the net and tried with Smart identification as "OFF" to improve the execution speed. But with this, values with .* were not recognized by QTP. Also, I declared variables and checked the speed but nothing increased the speed.

What can be done to make the increase the speed of execution for statements involving innertext.


RE: How to reduce the execution time of script involving innertext in webelement - Ankur - 03-31-2014

Looks like Smart Identification(SI) is getting invoked during identification of an object. Check the results to find out which of the properties are used by SI. Once you get those properties , make appropriate changes to OR and run your script with SI off.
In case you have lots of heavy images and you are not checking them, you may want to turn them off in your browser to decrease page load time.