setting fish for web browser instead of text editor - config

When running fish_config, it starts the configuration with Web config started at 'file:///home/akwXXXX/.cache/fish/web_config-K1L2BW.html'. Hit enter to stop.
Yet, instead of opening the web browser, it starts the code editor I have.
What should I do to use my default web browser?
Thanks

fish_config is a python script that uses python's webbrowser module, which respects the $BROWSER variable.
So set $BROWSER, e.g. via set -gx BROWSER /path/to/browser in your config.fish.

Related

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

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.

How to open and close browser in RFT

I am new to RFT and i just want simple script to open browser and close the same using RFT.
I tried to find solution on internet but there were solutions which i can't digest.
Help me out on this
First, you need to enable your browser. Then configure your application. After that you can use the recorder to start your configured application (this starts the browser if it is a web application) and you can also use the recorder to record the close browser action.
For starting your browser the generated code will be something like this:
startApp("nameOfTheAppYouConfigured");
For closing:
browser_htmlBrowser(document_YourDocument(), MAY_EXIT).close();
BTW: What is so difficult in following a guide like this or just using the RFT tutorials...

Start a browser with your own custom title from command line?

From a shell command line:
start "title" program
will start a session with a your custom "title"
however, when starting a browser, the "title" doesnt show up.
Does anyone know the syntax to make the "title" be on top of the browser title?
ref: http://ss64.com/nt/start.html
From a shell, there's simply no way to change the title of the browser's windows. You would need to use the Win32 API to do that (e.g., by using a window hook to modify the behavior of the browser), but this is pretty complex to do. An alternative would be to develop an extension/add-on for the browser, but this means that you would need to write an add-on for each browser you need to support, and to have these extensions installed in the browser.

How do I detect that SSL is broken on a page, using Selenium

We have pages where we occasionally see compromised SSL certificate because of third party scripts that load non HTTPS resources (Initially they're fine but they occasionally change). We would like to test those pages for broken SSL every day.
We have tried one approach, attempting to catch a pop-up message that would indicate that we have insecure content on the page. However, we have been unsuccessful in simulating the pop-up message through selenium. It appears that selenium has automatically disabled any popups. While we have identified a Selenium method to disable the suppression of the pop-ups(disable-popup-handler) but we have not been able to successfully see the popup even using this method.
Has anyone found a way to detect broken SSL pages using Selenium?
You need to load a browser profile (with WebDriver) that doesn't have the setting for popup blocker enabled (using the Profile class and giving it the right properties). Then, you will get the Windows popup message concerning the SSL cert. If , for some reason, you cannot control the popup using WebDriver (because its limited to Action control only within the browser content window) then you can use Sikuli API to handle the dialog and export the cert to the "Downloads" dir and then copy the file to expected location for inspection. Unfortunately, if you use Sikuli, that will make your automation script sequential and not work via a RemoteWebDriver grid server and so you wont be able to run parallel tests. Hopfully, WebDriver gives you access to the dialog and so you will be able to run with RemoteWebDriver because that is the best way to go when running scripts, even if you run a browser locally.

Does IntelliJ have an internal web server to serve static content of a web application?

Right now, the directory of my module is defined as an IIS virtual directory and IIS serves the files.
I was wondering whether IntelliJ has an internal web server, which can serve the files, without the need for any third party. Eclipse does.
UPDATE: built-in web server is available in the recent IntelliJ IDEA versions (starting from 13). You can find more details in the blog (yes, this feature first appeared in WebStorm).
IntelliJ IDEA has no this feature, you need to install and use any third-party web server that can serve the content from the project folders.
A built-in HTTP preview server will be part of Intellij IDEA 13 and is already available in the EAP: http://youtrack.jetbrains.com/issue/WEB-7148
"All existing actions — preview in browser (pop-up over html file or menu action or
shortcut), open in browser and create/debug html file action now open file on built-in web
server
http://localhost:63342/<project name>/<file path relative to source or content root>"
In other words, right-click on an HTML page and select "Debug" or "Open in browser", and IDEA 13+ will serve up that page via port 63342.
Here's another super simple option, install Python: http://www.python.org/getit/
Then open a shell prompt, navigate to your root web folder (e.g. public) and run python -m SimpleHTTPServer - This starts an HTTP Service on port 8000.
Further reading should you need it: http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python
I've got mine running on Windows 7 but the above article still applies.
Another option is is create a PHP project that, starting with v 5.4.0 of PHP includes a built in web server. This page explains it all ...
http://www.jetbrains.com/idea/webhelp/php-built-in-web-server.html
IntelliJ IDEA has a built-in web server that can be used to preview and debug your application. Just watch this YouTube video or follow the steps below.
Option 1
You need to add new 'JavaScript Debug' configuration:
Click Add Configuration... or Edit Configurations... in the Navigation bar
Click button in the toolbar or press Alt + Insert to create a new configuration
Select JavaScript Debug under the Templates node in the tree view of run configurations
Fill in Name, URL, Browser and click [OK] to save the configuration
Use http://localhost:63342/YOUR-PROJECT-NAME/index.html for URL
Now you can run the configuration:
Click run or debug button in the Navigation bar (or use Shift + F10 / Shift + F9 hotkeys).
Option 2
Running web page in browser without creating a configuration. Refer to the related IntelliJ IDEA Help article.
In the editor, open the HTML file. This HTML file does not necessarily have to be the one that implements the starting page of the application.
Do one of the following:
Choose View | Open in Browser on the main menu or press Alt+F2. Then select the desired browser from the pop-up menu.
Hover your mouse pointer over the code to show the browser icons bar: . Click the icon that indicates the desired browser.
Result
Google Chrome browser with a demo web page served by the Intelij IDEA's built-in webserver:
One simple way is to create a NodeJS / Express project in IntelliJ that is your web server. You can then use it to serve your static web pages and any other web content. The NodeJS web server is very small and runs fast - noticeably faster than IIS and Apache. Best of all you can just hit the Run button in IntelliJ or WebStorm to start it up.
By default, a NodeJS / Express project includes a public/ directory that you can use to contain your static pages that you can then view from http://localhost:3000/
This explains the steps required to enable NodeJS in IntelliJ and includes links to other Node resources:
http://www.jetbrains.com/idea/webhelp/node-js.html
If you feel the need, you can reconfigure your NodeJS server using server side Javscript code. You can add SSL support or almost any other server side features you care to dream up. Just add NodeJS modules using the npm (Node Package Manager) command line tool included with the install. NPM Registry https://npmjs.org/ indexes all the available modules.
You can configure IntelliJ to use a lot of different application containers, but each of them must be downloaded and installed separately. I currently have mine configured to serve via jetty, like eclipse, and also tomcat, tc-server, jboss, and node.js. It's pretty easy to set up.