Link not being clicked on playback

12 posts, 0 answers
  1. Rohit
    Rohit avatar
    10 posts
    Member since:
    Oct 2012

    Posted 03 Dec 2012 Link to this post

    Hi, 
    I'm working on automation of testing by record and playback. I successfully recorded a test run, but when i playback the test case, it does not click on a particular link. It tries to find the link but eventually fails and gives below error:
    **************************************************************************************************************************
    '12/3/2012 10:44:19 AM' - 'Fail' : 8. Click 'href="g_CompanyApplications.aspx?Task=Application&ShowNav=1&CoID=1981&Page=Applications
                ">'
    ------------------------------------------------------------
    Failure Information: 
    ~~~~~~~~~~~~~~~
    Unable to locate element. Details: Attempting to find [Html] element using 
    Find logic 
     (Html): [href 'Exact' g_CompanyApplications.aspx?Task=Application&ShowNav=1&CoID=2481&Page=Applications] AND [tagname 'Exact' a]
    Inside Frame:[Frame:name=METSUSFrame,src=http://dev5.a2zinc.net/netdev/globaladmin/GlobalAdmin/g_entrance.aspx,UseQuery:True]
    Unable to locate element. Search failed!
    Element was found by backup search only! We recommend editing the element to correct the primary find expression. 
    Backup search: 'xpath=/html[1]/body[1]/div[1]/form[1]/div[9]/table[1]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[2]/td[3]/div[1]/a[1]' 
    **************************************************************************************************************************************
    Can someone please help me on how to resolve this error. The element is defined as below during execution
    <TD align="Center" background="../images/SubNav_bg_Comp_2.gif">
                  <div class="SubNav">
                    <a href="g_CompanyApplications.aspx?Task=Application&amp;ShowNav=1&amp;CoID=2503&amp;Page=Applications&#xD;&#xA;                ">
                      Applications
                    </a>
                  </div>
    </TD>


    During record, the link was recorded as "Click 'ApplicationsLink1' . It was not being recognized during playback.So please let me know how can i get test studio to find the element during playback.

    Thank You
    Rohit Pillai       
























  2. Rohit
    Rohit avatar
    10 posts
    Member since:
    Oct 2012

    Posted 03 Dec 2012 Link to this post

    I think this error is because the element is present inside a frameset and teststudio is unable to find it while running the test case. Can someone let me know what changes do i need to make in my test case so that the element can be identified during the run and a click action be performed on it.
    I did go through the telerik documentation for frames http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/recording-tests/frames.aspx but could not find details on resolving the issue. I'm attaching the frame properties in this reply. Please take a look and let me know what needs to changed in order for the element underneath to be identified,

    Thank You. 
    Rohit Pillai
  3. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 03 Dec 2012 Link to this post

    Hi Rohit,

    Thank you for providing the log. Looking the error you are getting, the frame is successfully found, but Test Studio is unable to find the link inside of that frame. The problem is most likely in its dynamic content. To overcome this, use the tilde(~) character to indicate a partial match and change the Find setting for the "href" attribute from:

    g_CompanyApplications.aspx?Task=Application&amp;ShowNav=1&amp;CoID=2481&amp;Page=Applications

    to:

    ~g_CompanyApplications.aspx

    Let me know if we can assist you further with this.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  4. Rohit
    Rohit avatar
    10 posts
    Member since:
    Oct 2012

    Posted 05 Dec 2012 Link to this post

    Thank You for the help. It worked.
  5. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 05 Dec 2012 Link to this post

    Hi Rohit,

    You're welcome! Please contact us again if you have further problems.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  6. Rohit
    Rohit avatar
    10 posts
    Member since:
    Oct 2012

    Posted 25 Feb 2013 Link to this post

    Hello,
    I'm facing the  same problem again. The click on the image is being recorded but not replayed. I tried to use the above solution, but still was not able to get it work. The failure log is as below:
    ------------------------------------------------------------
    Failure Information: 
    ~~~~~~~~~~~~~~~
    Unable to locate element. Details: Attempting to find [Html] element using 
    Find logic 
     (Html): [id 'Exact' img115004] AND [tagname 'Exact' img]

    Inside Frame:[Frame:name=METSUSFrame,src=http://dev5.a2zinc.net/netdev/globaladmin/GlobalAdmin/g_entrance.aspx,UseQuery:True]
    Unable to locate element. Search failed!

    Element was found by backup search only! We recommend editing the element to correct the primary find expression. 
    Backup search: 'xpath=/html[1]/body[1]/form[1]/table[1]/tbody[1]/tr[1]/td[1]/span[2]/img[310]' 

    Learn more about finding elements here:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/unable-to-locate-element.aspx
    ------------------------------------------------------------
    '2/25/2013 4:45:13 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
    ------------------------------------------------------------
    '2/25/2013 4:45:13 PM' - Overall Result: Fail
    '2/25/2013 4:45:13 PM' - Duration: [0 min: 20 sec: 978 msec

    I'm attaching the DOM and logs for your review

  7. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 27 Feb 2013 Link to this post

    Hi Rohit,

    Looking the attached DOM file, the 'src' of the frame is GlobalAdmin/g_entrance.aspx. In order to change the 'src', you need to change the frame BaseURL property to: ~GlobalAdmin/g_entrance.aspx. See the attached screenshot.

    Please give it a try and let me know if it works.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  8. Rohit
    Rohit avatar
    10 posts
    Member since:
    Oct 2012

    Posted 01 Mar 2013 Link to this post

    Its not working even after I changed the base URL. Is it possible for your team to help me if I provide you access to that page for taking a look at it?
  9. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 01 Mar 2013 Link to this post

    Hello Rohit,

    Yes, this will be the best and fastest way for us to troubleshoot this. Please provide direct access to the page in question along with a sample test(in a .zip file) and we'll do our best to find a workable solution for you. 

    Hope to hear from you soon.

    All the best,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  10. Rohit
    Rohit avatar
    10 posts
    Member since:
    Oct 2012

    Posted 04 Mar 2013 Link to this post

    Hello,
    I have got the username and password setup for the webpage being tested. Can you please let me know how should I provide you with the username and password.
  11. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 05 Mar 2013 Link to this post

    Hi Rohit,

    Please create a Test Studio support ticket and reference this forum post(ID: 636137) to provide us credentials and links. Support tickets are completely confidential unlike forum threads.

    Regards,
    Plamen
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  12. Rohit
    Rohit avatar
    10 posts
    Member since:
    Oct 2012

    Posted 08 Mar 2013 Link to this post

    Hello,
    I have put the details regarding the test case and access in ticket # 628858
    Please take a look at it and let me know in case any more information is required.
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!