Scott Hanselman

Accessing Fields with Regular Expressions and Watir

February 14, 2006 Comment on this post [1] Posted in ASP.NET | Ruby | Watir
Sponsored By

This is just a reminder to myself and anyone else using Watir for Web Application Testing. Nearly any method supports using Regular Expressions within. Brian Vallelunga reminded me of this.

For example:

ie.text_field(:id, /myTextBoxName$/).set("Hello World")

That finds any control that ends with "myTextBoxName" and sets its value

Here is an example using the link method to click a hyperlink using the url attribute:

ie.link(:url, /shtml/).click

This will click the link that matches shtml. RTM!

Now playing: Living On Earth - Living on Earth: February 10, 2006

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Upgrades and problems with Comcast's Motorola HD-PVR

February 14, 2006 Comment on this post [14] Posted in Bugs
Sponsored By

CIMG4539When we brought HD (High Definition) TV into the house, we wanted to keep it simple. Sure, there's DirectTV HD and there's over-the-air HD and the Windows Media Center, but the absolute simplest thing we could get was HD through our local Comcast cable.

Our requirements were simple. We want HD and we want a DVR/PVR (Digital Video Recorder.) We just can't live without "Tivo"-like functionality. We don't want too much TV now, and we hate the idea of "appointment TV." I don't know when Will and Grace is on, and I don't care. We watch TV when we want to, not when it's on.

That said, the Motorola single box solution offered by Comcast served all my purposes and we've been happy with it for the last few months. It's not as shiny as my 2 Replay TVs, or my Media Center PC, but it has dual tuners and it does HDTV. Sold.

So, anyway, it started stuttering last week and that wife wasn't having that. I called Comcast and they send a fellow over and he replaced it.

The model he brought LOOKED identical on the outside and the software UI is identical as well. However, the BACK of the device is totally different. TOTALLY.

  • There's no DVI connector anymore. The guy was flummoxed and I was a little frustrated. He said, oh, well no one uses DVI, forgetting for a moment that I, the fellow whose house he was in, did in fact, not only use DVI but wasn't interested in changing. :) This box supports only HDMI or Component. I have HDMI input in my Sharp LCD, but the Harmony 880 Remote and everything else is entirely set up expecting the HD feed to come form DVI and I wasn't interested in re-programming. He didn't have an HDMI cable anyway. So, off to Magnolia Hi-Fi to buy a $25 female DVI to male HDMI adapter. If you upgrade, be aware.
  • The software interface continues to look like crap in HD. I output at 720p and the interface is clearly rendered internally at some non-720p resolution and the resultant anti-aliasing and kerning leaves much to be desired. My wife can't see it, but it bugs me.
  • More and more - I'm not sure if this is a result of the upgrade - I see the MPEG artifacts in HD feeds. I'm particularly put off my NBC's Winter Olympics feed. It is just me or is this thing compressed all to heck?
  • The new box includes an SATA adapter which makes me wonder if it'd pick external storage. Since it only supports 17 hours of HD, I may try it. It also has 2 Firewire points, one USB and an Ethernet. I'm going to poke around and see if they are turned on.
  • It adds an RF out that the previous model didn't have. Not useful for me, but would be useful if one were to chain a VCR in and wanted to avoid a Coax Y-Adapter.
  • There's also a slot called TV Pass Card whose function is unclear to me. Anyone?

All in all, this box is a little faster, snappier, than the previous one. This might be due to a lack of disk fragmentation and it might get arthritis later. We'll see. I know Omar hates his. I'm not too worried about it, but I do wish Portland's Comcast had CBS.

One other thing, has anyone else noticed that TNT's HD feed is just stretched 4:3? It's not 16:9 at all, they're applying some kind of fish-eye stretchy filter. It's hard to watch.

UPDATE: Interesting, according to the Wikipedia on the Motorola 6412, I've received a "6412 Phase III," the latest one. It has 12.x firmware, not the 9.x firmware and has better analog picture quality. I haven't noticed, as I don't watch analog, but I'll take a look, using Jon Stewart as my litmus test. Rumor is there's a 12.22 update coming out that fixes a number of issues.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Configuring PPTP VPN with alternate Linksys Router Firmware

February 12, 2006 Comment on this post [2] Posted in Gaming
Sponsored By

A couple of folks emailed me about how to get VPN to work using the DD-WRT firmware and my Linksys Router and why I said "zero install." Since I work in a corporate environment, as does my wife, we're used to having to install Cisco VPN or other 3rd party VPN clients. I called the solution I'm using for home "zero install" because I was able to use the Windows XP built in stuff with this firmware.

Step 1 - Get a Dynamic DNS Hostname

Dynamic Network Services will give (or sell) you a DNS name like myhouse.dyndns.org that is easier to remember than your DSL or Cable Modem's possibly-changing IP address. Additionally, firmware like DD-WRT will let you enter your DynDNS name and password and will automatically update the service with your current IP address.

Go to your router's Web interface, usually at http://192.168.1.1 and find the DDNS section. Enter your DynDNS username and password, as well as the host address you chose. That will be the address you'll need to remember to VPN into your house.

You can skip this step if you have a static IP address and you're able to remember it. I'm not that smart.

HANSELMAN - Dynamic DNS - Mozilla Firefox

Step 2 - Configure VPN on the Router

Find the PPTP section in the administration section of your router's Web interface. "Enable" the PPTP Server and enter in your router's IP address. This is almost always the same IP address that was displayed in the DDNS section in the previous step. Enter a Client IP range that is outside the range you chose for regular DHCP. I picked 192.168.0.210-220 for VPN'ed clients and 192.168.1.100 for "regular" clients that connect via Wireless or Wired.

Under CHAP Secrets, enter a username and password in the format "username * password * " and make sure to pick a VERY strong password.

HANSELMAN - Services - Mozilla Firefox (2)

Step 3 - Configure the (Windows) Client

This step will happen OUTSIDE your home, perhaps at your local coffee shop or anywhere you can take your laptop and attempt VPN back into your home.

In Windows XP, go to Network Connections and run the New Connection Wizard. Select "Connect to the Network at my workplace" and click next. Select "Virtual Private Network connection" and click next. Enter in any name for this connection and click next. Now, enter the hostname you select in Step 1, like myhouse.dyndns.org and click Finish.

Go back to Network Connections and find the connectoid you just created. Right-click and select Properties. Select the Security Tab and ensure that "Require Data Encryption" is selected as well as "Require Secure Password" is picked in the drop down. If you like, you can go into Advanced and select Microsoft CHAP and MS-CHAPv2, but you'll get the same result.

Now you should be able to connect to your home over any Internet connection you come upon, assuming that connection allows outgoing PPTP connections. I've never had a problem at hotels or cafes.

Now playing: OXM Magazine - Episode 3: Official Xbox Magazine Video Podcast

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Casio Exilim EX-Z3 and Casio Exilim EX-Z750 Digital Cameras

February 12, 2006 Comment on this post [1] Posted in Reviews | Z | Movies
Sponsored By

Z750Mo and I picked up a new Digital Camera today. We'd been using a Casio EXILIM EX-Z3 for the last several years and were very happy with it. Sure there's lots of nice Pro-sumer cameras out there, but we wanted a small (purse or pocket) camera that we could take travelling without thinking much about it. Our Z3 was a 3.2 megapixel camera and was taken to four continents without a hitch. All the travel pics that I've posted to this blog and all the photos of Z have been taken with that it.

Naturally we look at Casio first, partially because of the WAF (Wife Acceptance Factor) and partially because the first camera worked so well.

We ended up with the Casio EXILIM EX-Z750 which appears to be very well thought of within this kind of camera.

CIMG4521Things we like about it

  • 3x optical zoom. Digital zoom is useless. I'd like even more zoom, but 3x optical is still pretty good considering the camera is only 0.9in thick.
  • Max 7.2M resolution which is 3072x2034, suitable for 8x10 but VERY nice for 5x7 photos.
  • MPEG-4 movies at 640x480/30fps. We loved the movie support within the Z3, but it was only good for 30 seconds. The Z750 will take video until it fills up.
  • ~300 shots per battery. We'll fill up the memory before the battery dies - important when you're taking photos in the bush.

Pleasant Surprises

  • Has a "Whiteboard Mode" that will automatically de-skew photos of rectangular things. I'll be using this at work. Example below:
    • CIMG4531CIMG4530
  • Has an "ID photo" mode which will be useful for Passport Photos, which we do more often than you'd think.
  • It boots up in about a second, which is cool, and way faster than the old camera.

Stuff to Think About

  • This are some big-ass files. At full resolution with fine quality, we're talking about 4 meg JPEGs. Gotta figure out what to do about that.
  • It's still not that good at low-light and the flash sucks.

All in all, we're pleased. Now I've got a world-weary Casio EX-Z3 for sale in Portland with two docking stations, any takers?

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

WatirMaker redux or Watir WebRecorder ne WatirMaker

February 11, 2006 Comment on this post [1] Posted in Ruby | Watir | Tools
Sponsored By

Watir WebRecorderWell here's a shiny development. The folks at MJTNet have released a free version of the WebRecorder software that makes Watir code. It's beta 0.1, much as my own WatirMaker was (is).

It does more than my spike does including support for server auth login boxes, popups and nested frames. Be sure to use the mouse to click things as it's a little touchy about using the keyboard, especially if you pressed Enter to submit a form.

This (and WatirMaker) is a great way to jumpstart Watir development. I wouldn't recommend trying, assuming or thinking that you write all your tests with a tool like this, but it's a nice way to get started.

We've ended up writing most of ours from scratch.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

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