Micro Focus QTP (UFT) Forums
[UFT] Fixed web tests with dynamic parts - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: [UFT] Fixed web tests with dynamic parts (/Thread-UFT-Fixed-web-tests-with-dynamic-parts)



[UFT] Fixed web tests with dynamic parts - jdd - 04-04-2016

Greetings,

I am coming from a year of Telerik Test Studio and now looking at HP UFT solution for our project for about a week now. I have stumbled upon a problem that other testing tools also tend to struggle with - dynamic urls. Our url is in a form of <hostname>/controller/action/<order hash>/ where hostname would be parametrized and orderhash should be ignored. So far I have not found a way to make UFT ignore order hash.

Exact problem is that in action that uses one of these pages at first (recorded) run Page object can be found but when hash changes UFT no longer matches the page. Using object repository and setting Create new Page test object for Different test object descriptions but that did not help. I tried to look up to what UFT matches the Page but there seems to be no such method to do so. I tried using a different approach using direct descriptive matching but that just renders object repository useless and hence the reusability of testing locators.

This is really stopping the testing as objects can not matched so if anyone has any hints on how to solve or work around this problem I would be very much grateful.

Best regards,
Janez

edit: updated title with uft


RE: Fixed web tests with dynamic parts - vinod123 - 04-04-2016

Hi Janez

send me the screenshot of the forms which you want to write the script i hope that i may help you in finding a solution for the problem


RE: Fixed web tests with dynamic parts - jdd - 04-04-2016

Hi vinod123,

Thank you for answering so fast. There is not much to screen-shot really. Imagine adding an item to cart and that takes you to link: http://example.com/checkout/delivery/01234567890abcdef/. There you select delivery and get redirected to payment page that is on http://example.com/checkout/payment/01234567890abcdef/.

As far as I understand UFT matches objects on to Page object which matches that url for each page. This all works well until I close browser and restart the process. In that case the hash might be "fedcba9876543210". Now UFT no longer detects the Page object as present as the URL has changed.

I hope I could explain this clear as I am not a native speaker but please let me know otherwise.


RE: [UFT] Fixed web tests with dynamic parts - vinod123 - 04-05-2016

I am working on it i will send solution as soon as possible