Forum Discussion

shreyabhtngr's avatar
shreyabhtngr
Occasional Contributor
9 years ago

How can i test hyperlinks on a web page using Test Complete

Currently i am trying to automate a web course which has hyperlinks . i want to test if the hyperlinks are working or not. Test Complete is nit capturing those hyperlinks

 

What should i do?

  • Colin_McCrae's avatar
    Colin_McCrae
    8 years ago

    It's not a simple web page with hyperlinks on it.

     

    Such as: https://www.google.co.uk/

     

    ... which will appear as a hyper link in my reply.

     

    That would be simple to test. (In fact, try it. Object spy it with TestComplete. Record yourself clicking it and play it back. It should work just fine)

     

    What you have is an embedded document of some sort (a PDF is a fair guess) and it has link embedded within it. PDF's are not the most automation friendly type of document. But whatever type it is (we don't know this because we don't have the page in front of us to inspect), it is obviously obscuring the links to you. But you should be able to extract the link from the PDF or something. Probably. There are a couple of add-on's you can use for TestComplete which make PDF handling a little easier, but I've never used them personally, I'll leave others to comment there.

     

    So you need to figure out two things:

     

    1. What type of embedded document it is, followed by ...

    2. How you extract text/links for that document type.

  • Give us more information. Your question is way to vague.

     

    What do you mean by it's not capturing them? A hyperlink is generally pretty straightforward. Are you able to object spy them OK?

    • shreyabhtngr's avatar
      shreyabhtngr
      Occasional Contributor

      I want to test the hyperlinks on the web course. My approach was to click on the hyperlinks and use property checkpoints to make sure user is redirected to correct web page. after recording my steps I observed that at playback time Test Complete is not repeating my actions.

       Test Complete is not able to recognize those hyperlinks

       Want to know how can I make it work or is there any other way of doing this?

       

      Please find the screenshot

    • shreyabhtngr's avatar
      shreyabhtngr
      Occasional Contributor

      Actually I am automating a web course which has hyperlinks. I want to test those hyperlinks and make sure that user is redirecting to correct page. My approach was to click on the hyperlinks and use Property checkpoints to make sure user is navigated to correct page. But on playback I found that Test Complete is not able to click on those hyperlinks and my test fails. I did use Object Spy but it is not working for this scenario as the hyperlinks are inside the parent panel and object spy is not capturing those hyperlinks inside the panel

       

      Please find the screenshot

       

      Let me know if you need more information from my side

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        It looks like the hyperlinks you are trying to click on are not exactly links on the page but links within a document (PDF?) that is served up by the course. You might need to do things a bit differently there where you will need to capture the document itself, parse it out, and search for the links that way.  Without knowing the specifics, can't get more specific about the "how to".

        Short answer is: Yes, you can do what you are asking but it is a bit more complicated than just telling TestComplete to click a link.