Forum Discussion
The right and correct condition for your test to work properly is to use a single browser, single instance, and a single tab. When you perform the check it always goes to first browser, first instance, and first tab.
When Edge is closed, it maintains a session in memory, process keeps running. Try to force the above condition by checking for all browsers and terminating process https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/window-and-process/terminate-method-process-object.html
function CloseProcess()
{
var arr = ["iexplore", "firefox", "chrome", "MicrosoftEdge"];
arr.forEach(function(element){
Close_Process_Instances(element);
} );
function Close_Process_Instances(ProcessName)
{
var p = Sys.FindChild("ProcessName", ProcessName);
while (p.Exists)
{
p.Terminate();
p = Sys.FindChild("ProcessName", ProcessName);
}
}
}
Also, not sure it applies, but try to clear TestComplete browser.page cache https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-all/refreshmappinginfo-method.html?sbsearch=RefreshMappingInfo%20Method
- SlickRick8 days agoFrequent Contributor
Hi Hassan, thank you for your reply!
Sadly I already have some closing logic for the edge process and i tried so many variations of it.
I also tried what you suggested to do a theBrowser.RefreshMappingInfo and page.RefreshMappingInfo and it doesnt work either.
What is weird is that the actual page seems found, but the URL not loaded at all. See:I will continue to investigate but at this stage im pretty much getting clueless...
FYI, i did try to follow the edge setup as stated there:
Preparing Edge for Web Testing | TestComplete Documentation- Hassan_Ballan8 days agoFrequent Contributor
Hello SlickRick you are testing a desktop application but do you have the web module license to interact with webpages?
When I manually navigate to the URL, in TestComplete when I inspect "Object Browser", I do see the page with the URL value. In your screen shot your page value is blank and you are viewing the BrowserWindow and not the page.
- SlickRick8 days agoFrequent Contributor
Yes I do have the licenses with web testing.
I have 2 screenshots, one showing the page("") to show that the detected page is the correct one but with an empty URL. And the browser window to again show that it detected the right page.
As mentioned there is a twisted scenario where this occurs. It is really odd.
If i open a new tab and navigate to the URL manually i get the same result as you. Everything is fine:
But when the page is opened via my app the url is empty, but the page content is fine.
If i try to open the page using a powershell script:
Start-Process "https://www.sestech.com/Home/Contact"
The URL is empty.
Related Content
- 2 years ago
- 4 years ago
- 7 years ago
Recent Discussions
- 21 hours ago