• Ryan Farber's WebLog

    Reorder Elements with XLinq

    • 1 Comments
    So recently I was dealing with an internal program that was easily confused and would create XML files with the elements in the wrong order for the schemas used in other internal programs that read these Xml files. I started looking for a fast way to...
  • Ryan Farber's WebLog

    Class Extensions for XLinq

    • 0 Comments
    I love XLinq!! It really has made editing and manipulated Xml files much easier for me. However there are some features missing that I really wanted to use all the time so I added them using the new class extensions feature in .NET. So here's what I have...
  • Ryan Farber's WebLog

    Find and FindAll in .NET 2.0 collections

    • 2 Comments
    I just found that Arrays, Lists, Collections all have these Find, FindAll, etc... functions that use the Predicate syntax. I guess I've noticed them a few times but never actually tried to use them. Check this out. static void Main( string [] args...
  • Ryan Farber's WebLog

    High Contrast Mode

    • 0 Comments
    We are working on a simple helper tool for testing accessibility in IE pages. One of the few tests that is pretty hard to automate since it has to be reviewed first, although once reviewed screen shot comparisons of regressions could be useful assuming...
  • Ryan Farber's WebLog

    Teaching non-enthusiastic students

    • 1 Comments
    I work with several really good black box testers who know that it is time to increase their skills and learn to program. These skills hopefully will add them to list of people who can fix test automations, create simple automations and better understand...
  • Ryan Farber's WebLog

    Capturing web page images

    • 2 Comments
    After fiddling with DrawToDC I discovered it won't capture DXFilters since they aren't technically in the DC. Not to mention that getting the copied image in a state for actually saving to a file is more pain that I wanted to go to. I decided the best...
  • Ryan Farber's WebLog

    DrawToDC

    • 10 Comments
    I’m trying to take this code http://www.codeproject.com/internet/htmlimagecapture.asp?msg=783507 and convert it to C#. I can’t seem cast from IHTMLElement down to IHTMLElementRender. Trying through late binding also fails. IHTMLDocument2 doc = (IHTMLDocument2...
  • Ryan Farber's WebLog

    Screen capture when machine is locked?

    • 7 Comments
    Does anybody out there know how to get a screen capture (specifically of the WebControls web browser) when the screen is locked. When I move the window to the top left outside the monitor bounds it captures with a screen saver on but not when the machine...
  • Ryan Farber's WebLog

    Fable

    • 0 Comments
    If you haven't picked up a copy yet go and get Fable for the XBOX. This is a fun game. I think its the first adventure game I've played all the way through since Oddworld. It successfully put together game play fluidly with the story movies much like...
  • Ryan Farber's WebLog

    Speaking of Uri’s

    • 1 Comments
    Changing my code to convert string Url’s to Uri objects (because FxCop said it was a good idea) really helped solidify my testing. I never really thought about picking up Url’s that may not be http. I can see where a user may have done this with my code...
  • Ryan Farber's WebLog

    FxCop is your friend

    • 5 Comments
    If you haven’t used FxCop and you are writing code in C# go get it at http://www.gotdotnet.com/team/fxcop/ . This program rocks and will make your code better. The hard part is that on first run you’re going to get a surprising amount of issues and start...
  • Ryan Farber's WebLog

    Two simple file tricks

    • 3 Comments
    1. How do I know if a file path string has valid characters without resorting to catching an exception? bool IsFileNameValid(string fileName) { if (filename != null && fileName.IndexOfAny(Path.InvalidPathChars) != -1) { return false; } else {...
  • Ryan Farber's WebLog

    Removing a control from IE's Downloaded Program Folders

    • 1 Comments
    Task Automate the removal of a control from the IE’s Downloaded Program Files folder. Issues Controls may have more than one control associated with them Name in the “Downloaded Program Files” folder seen in Explorer is different...
  • Ryan Farber's WebLog

    Teaching C# to newbie testers

    • 2 Comments
    I keep looking for simple books for programming C# but even the learn in 21 days books are trying to teach too much. I’d hazard to say 99% of any code needed to be written by testers is simple file manipulation. You need to know about int, string, building...
  • Ryan Farber's WebLog

    I love C#

    • 0 Comments
    I love C#. It’s everything VB/VBS promised but didn’t quite give us. I was a hard core VB junky following the maxim “get it done today!” VB allowed me to do that. OK so every once in a while I needed code in C++ to keep my stuff reasonably speedy but...
Page 1 of 1 (15 items)