Test studio error on playback - Unable to locate element

7 posts, 0 answers
  1. Bhagya
    Bhagya avatar
    1 posts
    Member since:
    Jun 2011

    Posted 09 Jun 2011 Link to this post


    Following error come while playback, when its supposed to click on an radoutlookbaritem

    ---
    Unable to locate element. Details: Attempting to find [Wpf] element using
    Find logic
     (Wpf): [Name 'Exact' obiCustomer] AND [XamlTag 'Exact' radoutlookbaritem]

    Unable to locate element. Search failed!

    ---

    Note: i am evaluating test automation tool.
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 09 Jun 2011 Link to this post

    Hi Bhagya,
        check out this tutorial:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/troubleshooting_guide/test-execution-problems/tsguide_unable_to_locate_element.aspx
      
    Greetings,
    Stoich
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. vasu
    vasu avatar
    3 posts
    Member since:
    Sep 2011

    Posted 13 Oct 2011 Link to this post

    Hi,

    I have tried the solution that you have provided. It did not work for me. I did bunch of verify on the page. In my scenario there is a login and I select a value from a dropdown. One single run works fine. When I put the same steps into loop that does not work. It displays Unable to locate element error. I think in the second run the login is taking longer time to display the dropdown page.

    Is there a way I can do a pause after I click on Login button?

    Thanks,

    Vasu
  4. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 13 Oct 2011 Link to this post

    Hi Vasu,

    When you say you put the steps into a loop, do you mean a Logical Step or with Data Driven Testing? Without more information, I can only speculate as to the cause of the failure. Does the test log out of your app before starting the second loop? If not, your application is likely in a different state and the expected element is not present on the page at the same time during the second iteration.

    As part of best practices, we recommend frequently using Verify and Wait steps throughout your tests. This way you can specify a certain condition to be true (such as Wait for element to exist) before continuing. Of course as a last resort you can always use a fixed Execution Delay.

    Again, without more information we cannot definitively say why the failure occurs. If you app is publicly accessible we'd like to test it directly. If not, then the "Export Result to File" feature in the Step Failure Details is a great start.

    All the best,
    Anthony
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. vasu
    vasu avatar
    3 posts
    Member since:
    Sep 2011

    Posted 13 Oct 2011 Link to this post

    Thanks Anthony for the prompt response. In fact it failed in both Logical Step and Data Driven Testing.

    Here is my scenario:

    1. The application has Login screen with user Name and Pwd and then there is a pin text. It has 2 submit buttons. One is for the password and the other one is for the pin.
    2. After the login the second page has a drop down to select. and a submit button. I am selecting a value from the dropdown and I submit. In the second iteration of the logical step or DDT Test studio is not able to find the dropdown in the second page. I tried verify and wait. It is still failing.  I am yet to try Execution delay.

    The other feature that I was looking is Test as Step.

    Any info will help 

    Regards,

    Vasu
  6. vasu
    vasu avatar
    3 posts
    Member since:
    Sep 2011

    Posted 13 Oct 2011 Link to this post

    Update: Execution delay is not is working correctly in Logical Step.
  7. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 13 Oct 2011 Link to this post

    Hello Vasu,

    Your initial post indicates you are testing a WPF application. Is that correct? And is "Name" still part of the element's Find Setting? If so, it's possible that the second iteration is causing the name to change and the find logic to fail. Here is an article on Working Around Dynamic IDs, but it can be applied to any dynamic attribute.

    The original troubleshooting guide we gave you offers good techniques to isolate what is different on the page when the failure occurs. Try turning on the Auto-Pause option to examine the difference between recording and executing page states. Once identified, you can alter the Find Logic of the element so it can be found every time.

    Again, without testing this directly I cannot definitively say why the failure occurs. Ideally we'd like a copy of your app to test it directly. If that's not possible, then the "Export Result to File" feature in the Step Failure Details is a great start to get us more information.
     

    Best wishes,
    Anthony
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top