Monday, March 12, 2012

“Natural” Scrolling with Logitech Touchpad

I love my new Logitech Touchpad. It makes my work PC experience one step closer to my home Apple development environment. The one annoyance has been that the Touchpad options do not include an option for inverting the scrolling to allow for the “natural” scrolling like that on the Mac since Lion. (If you haven’t tried natural scrolling, it take a few days to get used to but makes so much more sense in a touch world. Do you scroll down your phone browser page by swiping your finger up or down? Shouldn’t your touchpad have the same movement?)

I found a nice little script for AutoHotKey here. It works great and I’m much happier.

Tuesday, March 6, 2012

Detecting Element Visibility in WatiN

I recently needed to check the visibility of an element in a WatiN test and I came across a very helpful post by Ashley Tate. I turned his method into the following extension method which makes my tests nice and easy.

   1:  public static class ElementExtensions
   2:  {
   3:      public static bool IsDisplayed(this Element element)
   4:      {
   5:          if (string.Equals(element.Style.Display, "none"))
   6:          {
   7:              return false;
   8:          }
   9:          return element.Parent == null || element.Parent.IsDisplayed();
  10:      }
  11:  }
Follow me on