Forum Discussion

nedbacan's avatar
nedbacan
Frequent Contributor
5 years ago

URL Object not found

  The page URL name changes dynamically don't know why,  I followed the documents and videos regarding dynamic pages and still cannot get the script to run everytime.    This is one of the Objects...
  • hkim5's avatar
    5 years ago

    the reason that you have two mapped objects with the names pageImagenet and pageImagenet2 respectively is because (as you pointed out) they have two distinct URL's that they are getting mapped by.

     

    This intuitively makes sense because you can imagine, two different web pages are two different objects in their own right. 

     

    If there is a third page, for example, where the URL is something like "http://localhost/IMAGEnet/Doctor" then TestComplete will by default, map this new object (probably s pageImagenet3) with identification properties of ObjectType Page and URL of that third "IMAGEnet/Doctor" url. 

     

    If what you are saying is that all of the child elements underneath each of those URL's remain the same (so in your case, the two pages http://localhost/IMAGEnet/Login and http://localhost/IMAGEnet/Patient) and that the button new patient persists throughout both of those pages, then by all means, you can rightclick on the object identification properties of both of those top level pages (so in your case pageImagenet and pageImagenet2) and within the URL property, replace the Login with * for pageImagenet and Patient wtih * for pageImagenet2. However, this is probably not the case.

     

    so when you say:

    "I noticed PageImagenet2 is browsing to http://localhost/IMAGEnet/Login, which cannot find it because it is expecting patient page http://localhost/IMAGEnet/Patient,  the software app under test changes  the URL dynamically so the TestComplete looses the connection how it was recorded from the beginning."

    -- to troubleshoot this, you should look at the step above the object method that calls on pageImagenet2. there is probably a run browser or navigate browser step; that is, pageImagenet2 in itself does not perform a run/navigate browser step, and there is a separate step for that) - this is probably where the error is occuring, causing you to believe that the name mapping is the problem. Otherwise, judging by your screenshots, I'd say there actually no problem with the dafault name mapping at all right now.