Forum Discussion

jsc's avatar
jsc
Regular Contributor
11 years ago

Unable to find the object ObjectIdentifier - how to avoid?

Hi all,



I am encountering the problem, that in some of my tests I get the error "Unable to find the object ObjectIdentifier".



The tests are run as keyword tests, but I also tried to avoid the problem by calling scripts that start the browser, but this brought up the same error.



The test is like this:

line 1: Run Browser | Internet Explorer | URL_A, 150000

line 2: Navigate | Internet Explorer | URL_B, 150000 

(I increased the waittime to 150 seconds)



There are 2 errors:

Error 1 comes at line 1:

- Unable to find the object ObjectIdentifier.

- Additional Info: The object with the specified attributes does not exist.

- The browser is startet with the default url set in the browser settings

- The browser did not open URL_A.



Error 2 comes at line 2:

- Unable to find the object Sys.Browser("iexplore")

- Additional Info: The object with the specified attributes does not exist.



Namemapping:

1) Initial Namemapping of the browser:

- ObjetType = Browser



2) Adjusted Namemapping of the browser:

- ObjetType = Browser

- ProcessName = iexplore* (tried iexplore as well)



--> error occurs with either namemapping



3) Webpages

- ObjectType = Page

- URL = url of the webpage



I checked http://support.smartbear.com/viewarticle/61429/



But how can I include this?

I just start the browser, that is obviously started but does not call the correct url!



What can I do to avoid those errors?



Best regards,

Joachim











5 Replies

  • jsc's avatar
    jsc
    Regular Contributor
    Hi Tanya,



    I found out that the problem was TestExecute version 10.40.2015.

    I updated to 10.40.2018 and everything was fine!



    Best regards,

    Joachim

  • Hi Joachim,


     


    Please make sure that the Web module is installed and enabled on your computer (File | Install Extensions...).


    If it is, try increasing the value of the Tools | Current Project Properties | Playback | Auto-wait timeout option. Does this help?


     

  • jsc's avatar
    jsc
    Regular Contributor
    Hi Tanja,



    the web testing module is installed, the I set the timeout to load the page to 240 seconds. The autowait timeout is 10 seconds and it would be counterproductive to increase this.



    But the timeout is not the problem, the test sometimes works and most of the time not.

    I tried different mappings this does not matter.



    All browsers are closed (process terminated) at onstarttest, this seems to be part of the problem, but this has to be done.



    The browser is obviously started but it shows the default webpage...

    The test does not find the browser. Even Sys.Browser("iexplore").Refresh() does not help.



    Best regards,

    Joachim



  • jsc's avatar
    jsc
    Regular Contributor
    I might have identified the problem:



    in the OnStartTestEvent all browsers are closed by terminating the processes via script.

    Afterwards the Run Browser or Navigate Function is not working properly.



    I disabled this script, when the browser is still open the test works fine but there is the warning, that the browser is already running. 

    How can I close the browser so that it is working correctly afterwards?



    I checked these webpages: http://support.smartbear.com/viewarticle/59764/

    But either is the browser not closed or is the process not terminated so that the browser is not started by the run browser call.




  • Hi Joachim,


     


    Do you use a short delay after closing the browser and before starting working with it? Does this work for you?




    function CloseBrowserAndRunTest()


    {


      Sys.Browser("iexplore").BrowserWindow(0).Close(5000);


     


      Delay(5000);


     


      Browsers.Item(btIExplorer).Run("http://smartbear.com/forums");


      var page = NameMapping.Sys.Browser().Page("http://smartbear.com/forums/*");


      var panel = page.Form("form").Panel("container").Panel("main");


      panel.Panel("content").Panel(0).Panel(3).Panel(0).Panel("frm_27").Table(0).Cell(1, 1).Panel(0).Link(0).Click();


    }