Forum Discussion
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
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.- Hassan_Ballan8 days agoFrequent Contributor
Using console or power-shell command, I do get Edge with the correct URL. Ask your developers on how the application is opening such URL, it may be relevant or to at least try it out manually using the same command.
Use windows task manager to make sure Edge is not running, process close is different from terminate (with Edge you need to terminate processes).
I made the following test loop and it works successfully every-time. If it fails for you I hope you can find something new to follow upon.
Notice the page wait, something you should use rather than the 5 seconds wait.
function Test1() { // Loop 10 times or as many as you need var Var1, TimeoutValue; Var1 = 1; for(Var1 = 1; Var1 <= 10; Var1 = Var1 + 1) { CloseProcess(); // Terminate browser processes //Run browser, navigate to URL Browsers.Item(btEdge).Run(); Browsers.Item(btEdge).Navigate("https://www.sestech.com/Home/Contact"); // Read deafult timeout, change it to one minute, wait for page, and restore timeout value TimeoutValue = Options.Run.Timeout; Options.Run.Timeout = 60000; Aliases.browser.pageX.Wait(); Options.Run.Timeout = TimeoutValue; // Validate page URL if(Aliases.browser.pageX.URL == "https://www.sestech.com/Home/Contact") Log.Message(Aliases.browser.pageX.URL, ""); else { Log.Error(Aliases.browser.pageX.URL, ""); Runner.Stop(); } Aliases.browser.pageX.Close(); // Close browser } }
What do you have in the NameMapping for the browser and the page? I have * for the page URL as in any page, but works the same if you have the correct URL.
- SlickRick7 days agoFrequent Contributor
Hi again, once again thank you for your help.
Im away right now so i cannot test your code but i did try something very similar but without success. I will give it a try when i come back.
For the moment i was doing a work around which was to verify that Sys.Browser('edge').CommandLine contained my url since all i cared about was to ensure that my application is opening the browser with the proper URL.
This is not perfect since i would also want to ensure that it doesnt open on a dead link so i will definitely try to have it work and ill keep you posted on the results.
Just FYI, i did try to switch to my machines to use Chrome instead of edge with the same result.
Related Content
- 2 years ago
- 4 years ago
- 7 years ago
Recent Discussions
- 21 hours ago