Micro Focus QTP (UFT) Forums

Full Version: Issue with every page name changes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
In my application ,every page name is changing ,fr examaple one page name is as - Employee/Details-2456-mmmm-b1.34 version-ss4.5687.Here every page name changes - Employee/Details-2456

changes for every pages remaing will constant per every page.


Ex. one page name as -Employee/Details-2456-mmmm-b1.34 version-ss4.5687

another page name as-Names/Pariculars-7535-mmmm-b1.34 version-ss4.5687

one more page as-Account/Branches-4234-mmmm-b1.34 version-ss4.5687


How can i handle this situation while scripting every page as common.Pls help me


Thanks

Madhavi
Hi,

Use regular expression as page name (mmmm) remains same for every page.
do for descriptive programming and use generic properties....
Use DP expression as below:

Code:
Browser("title=.*").Page(title:=.*")....
use ordinal identifier....

something like:

Code:
B().P().WebElement("name:=xxx","index=n")
use regular expressions

Use this

("title:= .*')

i hope this is use full to you.....
My developers like to do this to me as well, so I stopped using title. I use the URL now and only the server/application part. I don't really care what the name of the page is or the full url since that changes so frequently.

ie. to test mysite.com/someapplication/page1.html ...I use

Code:
Browser("url:=.*someapplication.*").Page()

This way I can switch between my 3 environments (dev, staging, prod) which can all have different subdomain.domain issues and except anything in the page as well as many levels of folders/pages. Provided the URL contains the application/folder I am testing, then it proceeds.

Hope this helps.