Forum Discussion

bhcommunity1's avatar
bhcommunity1
Contributor
3 years ago
Solved

Firefox - Inconsistent Launching of browser with URL value - keep running into Waiting for Page('*')

(System)

Microsoft Windows 10 Pro, 64-bit (10.0 Build 19041)

TestComplete: Version: 14.74.437.7 x64

- Have the latest patch for supporting Firefox 86.0.1

FirefoxVersion : 86.0.1 (64-bit)

 

[System Configurations] - Based on TestComplete recommendations.

1) Additional Recommended Browser Settings
- Disable Automatic Updates (Done)

 

2) Disable Unnecessary Add-ons (Done)

 

3) Check Multiprocess Mode Setting
- Create Environment Variable: MOZ_FORCE_DISABLE_E10S, value = anything. (DONE)

 

4) Browser Settings (All Done)
app.update.auto false Disable automatic downloading and installing of Firefox updates to avoid unexpected dialogs.
app.update.enabled false Disable automatic checking for updates to avoid unexpected dialogs.
app.update.silent true Suppress UI prompts for updates to avoid unexpected dialogs.
browser.formfill.enable false Disable automatic completion of forms to prevent unexpected behavior during test recording and run.
extensions.update.enabled false Disable checking for updates for Firefox extensions to avoid unexpected dialogs during test recording and run.
signon.autofillForms false Do not automatically fill login forms with user names and passwords to prevent unexpected behavior during test recording and run.
signon.rememberSignons false Disable Firefox Password Manager to prevent unexpected behavior when logging in to web applications during test recording and run.

 

5) Disable content process sandboxing (Done)
- Create Environment Variable: MOZ_DISABLE_CONTENT_SANDBOX, value = 1

 

Issue: This is inconsistent.  It may work fine with one run and fail on the next. 

When starting up FF Browser with URL:

1) Browser window will appear.

2) TestComplete will indicate Waiting for Page('*')

 - Never finds page object, and then tests fails. (See attachment for screenshots)

 

I can turn around and run the same test again and it works fine.

 

  • AlexKaras's avatar
    AlexKaras
    3 years ago

    Hi,

     

    CommonUtils.closeAllBrowsers2();

    .Close() command not always ends the process. Especially with browser process. Thus I would try approach with .Terminate() that is described in the help article for the Close() method. (I also mentioned it in my previous reply.)

     

    > TestEngineEvents_OnStartTestCase()

    Are all your tests marked as test cases? Maybe OnStartTest event is better?

     

    The Firefox applications does have multiple sub-processes.

    This is a usual behavior of modern browsers.

     

    P.S.

    One more comment as for the code of closeAllBrowsers2() function:

    > browsers[i].Close();

    a) As it is documented, .Close() method does not return information of whether or not the process was actually closed. Thus, the next message (Log.Message("...Closed a browser.") ) is misleading as it confirms the action that possibly was not completed.

     

15 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    I do not see opened page in Firefox on the screenshot provided. (New tab is not a page.)

    Can you provide the code that starts Firefox and navigates to URL? And how Browser and Page objects are nammapped (if you use NameMapping) ?

     

    • bhcommunity1's avatar
      bhcommunity1
      Contributor

      Look farther down in the original attachment and see below.  Its just the Browser Run method, providing it the URL.  Not using the Navigate method.

       

      // Initialize the application URL
      var strCEPUrl = Init.Get_ApplicationURLs("CEP");      // Just gets a url value.

      // Browser object based on Project Variable setting.
      var objBrowser = Init.GetBrowserObject();                 // See screenshot below.

      // Launch Browser with url
      objBrowser.Run(strCEPUrl);

       

       

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        objBrowser.Run(strCEPUrl);

        OK... This code does not return Page object.

        Can you provide code that gets Page and waits for it?