Scott Hanselman

Time Saver - Using Watir as a Startup Program in your ASP.NET Projects

July 20, '06 Comments [10] Posted in ASP.NET | Ruby | Watir | Bugs
Sponsored By

Often when you're inching forward within an ASP.NET project you'll find yourself repeating actions over and over again to get to a certain page, often three or four actions in to the application. As someone who hates repetitive actions this is what I do.

(These examples are in VS2005, but will work in VS2003, although the property dialogs have changed)

I use Watir to automate the clicks that will get me to where I'm going and set my Watir script to startup when I press F5 to start my project debugging.

Aspnetrubystart1

In this example, I have a script called justsignon.rb that signs on, visits the customer's accounts page, then goes to their Account History page. It's that page that I am currently debugging so I want to automatically show up there in a certain state when I start debugging.

require 'watir'

include Watir

require 'test/unit'

class WatirMakerRecorded < Test::Unit::TestCase

    def test_recorded

        ie = IE.new

        ie.goto('http://localhost:4970/MobileDemo/default.aspx')

 

        ie.text_field(:name, 'userTextBox').set('testuser1')

        ie.text_field(:name, 'passwordTextBox').set('123456')

        ie.button(:name, 'signInCommand').click

        ie.link(:text, /Hanselman/).click

        ie.link(:text, "Account History").click

        #UPDATE - the debugger will detach if the spawned process ends, so wait for ENTER

        gets

    end

end

Aspnetrubystart2

As I move forward in my development process I use different scripts to get me to different states.  This easily adds up to as much as 15 minutes to a half hour of rote "monkey clicking" that is usually wasted time.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

A half-year Podcasts

July 20, '06 Comments [11] Posted in PowerShell | ASP.NET | TechEd | Speaking | XML | Gaming | Bugs | Tools
Sponsored By

Hanselminuteslogo2When podcasting first came out I declared it totally lame in October of 2004.  Actually I said:

Sorry folks, PodCasting = Verbal Incontinence.  I'm just not feeling it.  You can't speak as fast as I read.  I don't like it when you read your PowerPoints to me, and I REALLY don't like it when you ramble on.  My commute isn't nearly long enough to slog through your PodCasts to find a nugget of goodness.  If you blog, I can ignore it, or read it in any order. I can skip forward by, gasp, moving my eyes. [Me in 2004]

Other folks had some good comments on Podcasting back in 2004:

FastmediaplayerThen fifteen months later I started a Podcast. I had started using iTunes' Podcast Directory and re-listened to some episodes of DotNetRocks. Carl Franklin called me and convinced me that if there was a short Podcast that was densely packed with information, it might not suck. After I started the podcast, Martin Plante said podcasting still sucks, but later came around and said it sucked less. :) Others have also had nice things to say. I also found that listening to a Podcast in double speed was helpful.

A half year later, we've hit 25 podcasts and had a blast doing it. I encourage you to check them out if you missed a topic you might be interested in. Also note that they all have PDF Transcripts if you prefer to read your podcasts.

A Half Year of Podcasts

Anyway, thanks again to Carl for the hard work and idea. Thanks to Travis for the name. Thanks to the listeners for listening. As always, send me your topics!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Z at Seven Months - A look back

July 19, '06 Comments [11] Posted in Bugs | Parenting | Tools | Z
Sponsored By

Wow. From...

 to CIMG5590 

...in seven and a half months. Madness I say.

This little man is heck on wheels. The first day I met him...

...he was eyes wide open. He spent a few months on and off tummy time...

...and rolled over shortly thereafter. Crawling came four months later...

...but the shock to me was that he was sitting up one Tuesday, crawling that Thursday and now has taken to standing on things. We found him trying to climb out of his crib. Mo caught him trying to eat the toilet plunger (Full story on Mo's Blog). He really wants to walk, but just doesn't know how. So, standing will do for now.

 CIMG5552CIMG5581CIMG5486

CIMG5546CIMG5494

He's a joy each day and I'm blessed beyond comprehension to know this guy.

Lessons learned at Seven Months

  • Anything two feet off the floor or below will be put in the mouth. This includes peas from last week found in a corner as well as bugs and dust. At least the latter two are protein.
  • Baby's are as surprised as I am when they poop without warning. Has there been an earthquake? 
  • Other people's babys are cute, but they are scary, fragile, and often smell bad. YOUR baby, on the other hand, smells like roses all the time and can be thrown around like a sack of potatoes to peals of laughter and giggles.
  • When your baby isn't quite a crawler but definitely not a toddler, he's a wobbler.
  • Nothings better in this world than the look of recognition your baby gets on his face when you come home from work and he gets that look that says "Hey! It's that guy again, he's back! Woohoo! He's hilarious!"
  • Water and the laws of physics in general may not be consistent, so we'll need to test them over and over and over again. Will the spoon fall this time? Wow, it did. I wonder now?
  • There's only 365 days in this first year. Squeeze every one of them.

Baby Posts

And now back to the technology...

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Roy Osherove's Windows Desktop Beauty Contest 2006

July 19, '06 Comments [4] Posted in ASP.NET
Sponsored By

Roy Osherove is having a beauty contest...a Windows Desktop Contest.

You send in a screenshot of your windows Desktop - the coolest three at the end of the contest get some cool prizes.

  • 1st prize: MSDN Premium Subscription and fame forever.
  • 2nd Prize: To be announced
  • 3rd Prize: To be announced

The contest ends August 31st 2006. The Judges are Roy, myself, Carl Franklin and Mike Gunderloy. Just the chance to win an MSDN Premium subscription is reason enough to submit your shot now! Get over there and crush his servers with the weight of your awesome desktop.

Scott2006homedesktop

Here's my home desktop. It's not nearly as cluttered at home as at work. Here's my work desktop:

Hanselmandesktopscreenshot20060703

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Hanselminutes Podcast 25 - Scott's .NET Blogroll (for July 2006 at least)

July 19, '06 Comments [5] Posted in Podcast | PowerShell | ASP.NET | XML | Bugs | Tools
Sponsored By

HanselminutesMy twenty-fifth Podcast is up. This episode is a discussion of a few of my favorite blogs. I had a HUGE list and ended up having to really chop it down in order to make it fit within our (my) time limit. Remember, Hanselminute tries not to waste your time!

We're listed in the iTunes Podcast Directory, so I encourage you to subscribe with a single click (two in Firefox) with the button below. For those of you on slower connections there are lo-fi and torrent-based versions as well.

This show was FULL of links, so here they are again. They are also always on the show site. Do also remember the archives are always up and they have PDF Transcripts, a little known feature.

Links from the Show

Sam Gentile (g08) Jeff Atwood (goj)
Hanzi Smatter (gou)
Dare Obasanjo (g09)
Mike Gunderloy (gok)
M.C. Hammer (gov)
Greg Hughes (goa)
Phil Haack (gol)
Kevin Smith (gow)
casey chesnut (gob)
Chris Sells (gom)
Overheard in the Office (goy)
Polymorphic Podcast (god)
Fritz Onion (gon)
Make Blog (goz)
Scott Guthrie (goe)
ASP.NET Blogs (goo)
Developing for Developers (gp2)
Presentation Zen (gof)
Channel 9 Videos (gop)
Joel Spolsky (gp3)
Raymond Chen (gog)
Michael Kaplan (gor)
Junfeng Zhang (gp4)
Debugging Tess (goh)
Wesner Moise (gos)
Powershell Blog (gp5)
Roy Osherove (goi)
The Daily WTF (got)
 BCL Team Blog 

Subscribe to my Podcast in iTunes

NEW COUPON CODE EXCLUSIVELY FOR HANSELMINUTES LISTENERS: The folks at XCeed are giving Hanselminutes listeners that is Coupon Code "hm-20-20." It'll work on their online shop or over the phone. This is an amazing deal, and I encourage you to check our their stuff. The coupon is good for 20% off any component or suite, with or without subscription, for 1 developer all the way up to a site license.

Our sponsors are XCeed, CodeSmith Tools, PeterBlum and the .NET Dev Journal. There's a $100 off CodeSmith coupon for Hanselminutes listeners - it's coupon code HM100. Spread the word, now's the time to buy.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.