Can you change Visual Studio 2022's default browser for Dockerised ASP .NET Core applications? - asp.net-core

When debugging my ASP .NET Core Web API application in Visual Studio 2022, I have the Docker configuration set to launch a browser:
This browser defaults to Edge. Is there a way to change this, to Firefox for example? That is my browser of choice and I would prefer it to simply open a new tab in an existing instance of that rather than an entirely separate Edge window.
Firefox is set as my default browser.
Thanks.

You can choose a default browser to use with the docker profile but it's not clear how to modify the list of possible browsers or if you can modify the launch settings for those browsers... anyway, from the debug toolbar menu you'll see the very small drop down menu arrow. Clicking on that gives you a series of drop down menus that lets you choose a browser.
Note the "Browse With..." does not work for me. The project rebuilds and nothing happens when I click that. And "Select Web Browsers..." gives a limited choice of chrome, edge, IE.

Turns out it does seem to use the default browser.
This is a new install of Win 11, and I had installed Firefox within the same session as my attempted debugging with it - a reboot seemed to result in VS using it as expected.
The default browser behaviour is documented here.

Related

I can't start Internet Explorer 11, always Edge is opened in Windows 10

I have to test a product on Internet Explorer but when I try to start it always Edge browser is opened. I tried to set IE as default browser but did not help. I try to set Chrome or Firefox as default but also not help. I tried to uninstall then reinstall IE component from 'Uninstall programs - Turns windows feature on or off' but also did not help.
I have upgraded my Windows to Version 1909 x64 but also before this update the problem existed. I am using a Dell Latitude E5470 laptop. I also search the IE and Edge group policy settings but I don't find anything which help solving this problem.
Your suggestions, ideas and help would be very appreciated.
Thanks.
For me, I was able to fix the behavior by searching for "Internet Explorer Compatibility" in the Edge settings panel. Then setting the "Open Sites in Edge" setting to "Never."
I have had a similar behavior in Windows 10 20H2 (As of writing this answer, the latest Windows 10 build so far). I had a scheduled task which opens a website at a given time, the command there is:
"C:\Program Files\Internet Explorer\iexplore.exe" https://some.webiste.com
After upgrading to 20H2 it always opened in Edge, also manually browsing to that website was redirected to Edge.
I found a setting in Internet Explorer under Internet Options -> Advanced Tab -> Browsing section -> Uncheck Enable third party extensions.
Note: This might need a restart to take effect and disable also other extensions but unfortunately as of this day there seems to be no other options to browse a website in IE which needs IE for one or the other reason.
Edit:
This behavior I was experiencing seems to be a DLL (ie_to_edge_bho.dll) file which comes with Edge and is being installed in IE. There is a static list of websites which get automatically redirected to Edge. Disabling this extension is greyed out and not supported out of the box, other than disabling all extensions via the option described above.
This setting lets you decide whether to open all sites not included in the Enterprise Mode Site List in Microsoft Edge. If you use this setting, you must also turn on the Administrative Templates\Windows Components\Internet Explorer\Use the Enterprise Mode IE website list policy setting and you must include at least one site in the Enterprise Mode Site List.
Enabling this setting automatically opens all sites not included in the Enterprise Mode Site List in Microsoft Edge.
Disabling, or not configuring this setting, opens all sites based on the currently active browser.
Note: If you've also enabled the Administrative Templates\Windows Components\Microsoft Edge\Send all intranet sites to Internet Explorer 11 policy setting, then all intranet sites will continue to open in Internet Explorer 11.
https://admx.help/?Category=Windows_10_2016&Policy=Microsoft.Policies.InternetExplorer::RestrictInternetExplorer
The problem was with 20H2(Microsoft Windows 10 Enterprise ver 10.0.19042) when I received the same complaint from multiple users.
So this has been sorted out using below registry fix as mentioned by #alpar
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\Main\EnterpriseMode and set RestrictIE value from 1 to 0
For me, the correct answer was the one provided by #josibu.
I was trying to use the performance profiler in Visual Studio 2019 for a Web project. For this function, there is no way to convince Visual Studio 2019 to use anything other than Internet Explorer. Even on Windows 11, it tries to run iexplore.exe when no such program exists. For those machines that do have Internet Explorer installed, but crippled by Microsoft, disable third party extension, as directed by #josibu.
You may get a message that the setting will not take effect until you restart your system. In my case, this was not needed. The change worked after I simply closed Internet Explorer.

Does Microsoft UI Automation Framework work with Chrome, Python and Java Apps?

I am working on an automation project, in which I need to capture the activities [ application launched, data entered, input type etc.] user performs on a desktop. I came across Microsoft UI Automation framework which so far works well for native windows based applications like MS Office, .NET apps etc. However I did not find any useful information / samples of capturing the information from different web browsers [Chrome is a must], Python apps, Java Apps etc. Can someone please confirm whether MS UI Automation Framework supports such apps. Any working example to extract user activities from these apps would be highly appreciated. Thanks.
Chrome only supports UI Automation for toolbars, tabs, menu, buttons around the web page. Everything that's rendered as a web page is not seen by UIA.
For the web page content, the easiest way is to use Selenium (driven by the ChromeDriver), which is kind of a de facto standard for browsers, and has nothing to do with UIA.
To test if an app supports UIA, and how far it does, it's very easy, just run UIA's Inspect tool and check the UI tree over that application.
Some additions to Simon's answer...
Chrome page content can be seen by UIA if you run chrome --force-renderer-accessibility. Only for existing Chrome process it won't work. Though user can create a new tab chrome://accessibility manually and enable UIA for all or some chosen pages. This method also works for AT-SPI accessibility technology on Linux. Of course, Selenium WebDriver is an industry standard here. But another way exists. Both Mozilla and IE support UIA by default.
Inspect.exe can be simply downloaded from this GitHub repo.
Regarding Java apps it depends on the app type. Your chances is about 50/50.
WxPython or PyQt5 are good for UIA. TkInter or Kivy apps are not.
P.S. There is an example how to drag a file from explorer.exe and drop to Google Drive in Chrome using Python library pywinauto.
I'm a bit late to the party..
But Chromes accessibility features are only activated once something tries to access it's accessibility.
If you call AccessibleObjectFromWindow ([DllImport("oleacc.dll")]) with the window handle an existing chrome window will have its accessibility activated (and you'll see the actual web page content in UIA!).
If the chrome window is opened after your app is running - Chrome pings open processes for any open accessibility apps... for that you use AccessibleObjectFromEvent and the event you're responding to comes from the windows pipeline: EVENT_SYSTEM_ALERT = 0x0002 .
The bottom line is - you have to tell chrome that there's something installed that wants to access it's web page content.
Oh! and your application has to be signed!! Unsigned apps won't be able to access web content - I think that's the same in firefox too.
I hope this helps someone in the future.
See:
https://www.chromium.org/developers/design-documents/accessibility

Blueprism - Not able to spy elements

I am using Blueprism to launch a URL in browser to spy it. I am able to launch the URL using the application modeller, but not able to spy it. The "Identify" option itself does not appear in blue prism. What is the problem and what is the solution ?
In spying a web application, key things to note for your application modeler;
1. your application modeler must be a "Browser-Based Application"
2. Launching from an executable or attaching to one. (Assuming you are launching from an executable from your question)
3. Specify url.
From your question. you are able to launch the browser from the application modeler. the most possible problem is you missing step 1 as mentioned above. Confirm your application modeler is specified as "Browser-Based Application"
Check a few things : is your modeler attached to the browser, are you in the right mode (for ease of use I would recommend using IE in HTML mode), and if that doesn't work try accessibility mode.
Try these simple steps:
Close the browser application and let the Blue Prism open your browser.
Try testing your object in Object Studio.
Now open your application modeler and launch. Check and you will find the identify option appeared.
If you launch application from Google Chrome, then you can get this error because in Google Chrome it's not possible to Spy and launch the applications. Any RPA Tools will support only Internet Explorer

Create/embed Firefox/Chrome base browser in Visual Studio

Im creating a freeware application (long live the free community) and I'm trying to add various features that might drive people to use the application such as implementing whatsapp web https://web.whatsapp.com/ into the app so that the user will always have an "always on top" window with their chats rather than everytime having to switch tabs if they're multitasking on their browser.
The problem i am having is that the built in Browser control with VS 2013 does not work with whatsapp web and i get the option to use supported browsers like firefox...chrome...safari.
Is there anyway to make a VB.NET application open an actual chrome/firefox based browser within itself?
I found an article on Gecko Browser...I am not sure if web.whatsapp.com would see this as a firefox browser: http://www.vbforums.com/showthread.php?692005-Mozilla-Firefox-Gecko-Xulrunner-in-VB-NET-%28versions-14-and-up%29
Help appreciated.

Bootstrap 3 navigation toggle button always appearing in IE11 (on remote server)

I'm experiencing a very strange behaviour with Bootstrap 3 when viewing in Internet Explorer. My nav bar works perfectly locally (I'm using VS2012, so the page is being served by IIS Express), but when I deploy it to one of our internal servers (running full IIS) it always appears collapsed (even if I stretch the browser across both my monitors!)
If I user Chrome, it works perfectly.
I've compared the files that are downloaded in each case, and they are identical. I have even create a test file which uses the example nav bar from the bootstrap website, and I see the same behaviour.
So, to summarize:
Local / IE Works
Local / Chrome Works
Remote / IE Does not work
Remote / Chrome Works
Any pointers about this very strange behaviour would be very much appreciated!
I found the problem, and it is Internet Explorer's compatibility settings.
Under Tools > Compatibility View Settings dialog there is a checkbox which says "Display intranet sites in Compatibility View".
This setting meant IE used an older rendering engine, which did not work very well with Bootstrap. Once it was turned off everything was fine.