'Please wait until download completes: "http://172.16.20.106/portfoliodocuments.html?portfolio_id=239&comme nts_div=true&share_div=true"
I am trying to click one of two links on a web page. TestComplete script tries to follow the URL associated with that link. The problem is that the URL is dynamic (portfolio_id will change between test runs, since new portfolios are created each time). As a result, when I rerun the script it gives me an "object does not exist" error.
I did add a parameter to the list of parameters to ignore for my project. For page URLs this works fine - it replaces the parameter value with an asterisk. But for links on the page the replacement is not made and I have to do what Robert suggested - replace the portfolio id with an asterisk manually in Name Mappings. Is there a way to automate this process for all objects?
I'd recommend just asking the developers to add some sort of ID or ClassName attribute to the link, and use those as the identifying attribute. If that's not possible, add some span tags around the link so you can identify it, and access its direct child.
You'll run into issues where that IP address will get replaced by a domain name, then later on after some refactoring you might see the URL prameters in different order, etc... it'll become too much of a pain.
I have to deal with the same issue as well, but anything after "?" I usually put an "*" in its place anyway since the numbers and such are not important to what I am doing with that page. Just keep in mind that if that is the only page that is coming up, it will pick up the page that you are currently on so those numbers really don't matter.