Forum Discussion

blbdt36's avatar
blbdt36
Contributor
9 years ago

Having trouble with objects do not exist error

I am getting the objexts do not exist error when I am trying to do testing on a pop up window on my web page.  It has worked once or twice, then I refreshed the page and that was it.  

 

When I run the script, the errors appear, but when I go through all the elements, they are appearing as mapped as expected with the Aliases I am using the reference them in the code.  I am getting really frustrated.  Any ideas?  

13 Replies

  • Sounds like timing issues. Are you sure whatever you're using is allowing enough time for them to appear?

     

    (Usually, the easiest way to verify this is to put an excessively long wait in before the action on the popup. If that makes it work every time, then you were try to access it too early and you need to put something in to detect it before you use it. I wouldn't use a wait permenantly. Hardcoded waits are never good ...)

     

    Either that, or dodgy runtime identification properties.

    • blbdt36's avatar
      blbdt36
      Contributor

      Thanks for the response - yes, I have tried a delay.  We have constant data being updated, so I actually have to use it in a couple places to give the data time to load.

       

      I was just able to run the script, but I have no idea how.  Then, all of the sudden, it stopped working again.  And again, when I look at the items, it still shows that they are mapped to the names I am using in the scripts.

      • blbdt36's avatar
        blbdt36
        Contributor

        And just to make it more fun - when I can run the script, it only works as a stand alone function.  I can't call it from my main program because I get the does not exist error.  I don't know what the difference is there or if it is even related, but maybe it's helpful.

         

         

  • @dmiscannon - that didn't change anything.  I took the delay out of my code since it didn't change anything, anyways

     

    @nishera - As I said above, it works when calling it by itself.  Although, there's been a fun development today.  If I try to call it from the main program, then run stand alone again, it fails.  If I only run it stand alone, it runs with no problems.

     

    @colin_mccrae - Honestly?  I didn't even understand what that page said, so I am pretty sure I am not doing that. 

     

    It is not like it is anything that is complicated at all.  It's a simple procedure:

    1. Right click to open the menu
    2. Click two check boxes
    3. Confirm the columns were removed
    4. Refresh the web page
    5. Confirm the columns are still removed
    6. Right click
    7. Click Refresh (to bring back all columns)
    8. Confirm all the columns appear again

    I use a variable for the object path for all the items because when I originally had the problem, I thought it was because I moved the items in the name mapping tab.  Regardless, I tried it with the full path with no change in behavior.

     

    1. Call it stand alone directly in the code, it works.  
    2. Call it as a function call from the main prgram, it fails
    3. Call it stand alone from the project, it works
    4. Call it stand alone after the main code has run, it fails
    5. Include code to open the webpage inside the function, it fails
    6. Call it stand alone after a function to open the webpage, but before the main code from the project, it works

     

    And it's only Tuesday *SIGH*

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      Where exactly in your 8 steps does it fail?

       

      And what is the error it fails with?

       

      Looking at the 8 steps, I'm not clear which bits are on the main page and which parts are on the popup? Also, is this a dialog type popup or some sort of modal popup window generated by the application?

       

      From what you're saying, it does sound like an identification issue. Do any of the identification properties used to identify your problem object (and all it's parents all the way up the tree) look likely to be varying at runtime? Like they contain big longs strings of random looking characters or something?

      • blbdt36's avatar
        blbdt36
        Contributor

        @colin_mccrae - when it is failing, it fails when trying to find the first checkbox, so step 2.  It fails with objects do not exist error.

         

        Hopefully this will clear up the steps as to where the actions/checks occur

        1. Right click on main page to open the right click menu
        2. Click two check boxes on right click menu
        3. Confirm the columns were removed on main page
        4. Refresh the main web page 
        5. Confirm the columns are still removed on the main page
        6. Right click on the main page to open the right click menu
        7. Click Refresh on the right click menu to bring back all columns on main page
        8. Confirm all the columns appear on main page

         

        I think if it is an identification issue, it is a really funky one.  I use the type and the Full name as the identification properties.  That seems to work best for my page.  Every time it fails, I use the Display Object Spy to confirm that the fields are still mapped as expected and they are.  Every freaking time.

         

        I think if it was something as simple as that, then it would always fail and not just when it was run with other code.