QA Graphic

Getting the Browser Version

A simple tip on getting the current web browser version using AppleScript and TextExpander.

Here's another awesome use of AppleScript within TextExpander.

In the past, whenever I create a detail bug report in Jira I would mention the browser that I tested with. So, what I used to do is open up the browser go to the About window and check the version. Then enter in the data in Jira.

The problem is that this is way too time consuming and not something worth doing with every bug report or ticket validation.

Things total changed with TextExpander. Now when I need to include the version of browser I am using, I simple type in chrome.version, safari.version or firefox.version. Having this set up, gives me the ability to add the browser version to every report.

Here's what my chrome.version snippet looks like in TextExpander:

tell application "Google Chrome"
set theVersion to "Chrome:" & version
end tell

Here's a screenshot of all three browser version snippets:

Browser Snippet

You can always modify the text to say "Google Chrome" or just "Chrome." Originally when I set this up I manually typed in the browser name, but I found I was typing the same thing over and over. That's why the name is part of the snippet.

The good thing about this is that I never have to worry about what version I am using, simply by typing in my abbreviation I am guaranteed to always get the latest installed version number. (I don't have to worry about if Chrome did a silent update when I last tracked the browser version.)

This is helpful when doing Google searches too. For example, if I want to know if there's any bugs in my version; I can type in firefox.version and "known bugs" to show me any reported bugs with the version I am using.

Bonus Snippet

What's really cool is that I can combine several of these snippets and get a good browser summary. This is useful for anyone asking what browser version I currently have on my computer. In addition, I can mention in my bug report what browsers I am testing with.

Multiple Browsers

If you use Jira, you can create another snippet so that the text outputs in a Jira table format.

By using today's TextExpander tip it's very easy to display your browser information any place you need it. The good thing too is that you don't need to open up the browser to see the version!

 

About

I find TextExpander, by Smile on My Mac, to be an awesome productivity tool. This past winter, I posted some cool snippets that demonstrate the power of the application. Occasionally, I will post some new snippets that I think will be useful in anyone's TextExpander library.

Schedule

WednesdayAffinity
ThursdayBBEdit
FridayMacintosh
SaturdayInternet Tools
SundayOpen Topic
MondayMedia Monday
TuesdayQA