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.
Solved! Go to Solution.
.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.)
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.
One more comment as for the code of closeAllBrowsers2() function:
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.
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) ?
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
OK... This code does not return Page object.
Can you provide code that gets Page and waits for it?
After the browser is launched with the url, the url leads to login page for the application. Login page is stored in NameMapping. Wait for login page to finish rendering and then attempt to login.
// Launch Browser with url
Aliases.Browser.CEP_pageLogin.Wait(); // <-- I assume the default wait comes into play waiting for page obj to render?
var strUsername = aqString.ToLower(Project.Variables.CEPSmokeTestUser);
Note: Then if the page object doesn't render (the issue), then I assume the default wait comes into play again looking for the txtUsername textbox object.
This is what I (partially) expected.
How Browser and CEP_pageLogin objects are namemapped?
The login page, uses the URL property with regular expression.
> URL property with regular expression.
Not regular expression but wildcards. 😉
I am more interested in how Browser is mapped. Can you post the screenshot for it?
I guess I don't know what your requesting "I am more interested in how Browser is mapped. Can you post the screenshot for it?"
You want screen shot of Object Browser layout, when the Login page is displayed? Not sure what your mean here?
Excuse me for not been clear enough.
Your code contains this line:
Here, Aliases references Browser and CEP_pageLogin objects. You provided screenshot of how CEP_pageLogin is mapped. Can you provide the same for the Browser one?
I.e., how Browser is mapped in the NameMapping editor?