When testing dynamic pages using SWEA the IsOptional property must be used. If the property is set to true it allows the Scene to be validated without that control being part of it.
The other day I automated a page that had 3 dynamic levels to it. In other words, when control 1 was present, control 2 and 3 were not; when 2 was present, 1 and 3 were not; when 3 was present, 1 and 2 were not. In order to successfully automate the page I had to toggle the IsOptional property on the fly. In the past I’ve used IsOptional as it was defined during my recording and present in my SWEA htp file, but I never had to modify the property in the middle of a test so that the Scene could successfully load. This is how I did it:
//Input a friendly name and submit the form ((HtmlInputText)(myBrowser.Scene[“FriendlyName”])).Value = userID; ((HtmlInputButton)(myBrowser.Scene[“FriendlyName”])).Click(); //Set the IsOptional property to false for the new control //that appears on the postback and the previous controls //that are no longer present to true ((HtmlAnchor)(myBrowser.Scene[“lnkViewUserDetails”])).IsOptional=false; ((HtmlInputText)(myBrowser.Scene[“FriendlyName”])).IsOptional=true ((HtmlInputButton)(myBrowser.Scene[“FriendlyName”])).IsOptional=true //Wait for the Scene to load myBrowser.Scene.WaitForActive(30000); //For some reason if I don’t run the RunIdentifcation() method //before I click the link a chained COM exception occurs. // So here I run the method myBrowser.ExplorerManager.RunIdentification(); //Now I can click the link ((HtmlAnchor)(myBrowser.Scene[“lnkViewUserDetails”])).Click(); //Now the link is no longer part of the page so I set IsOptional //to true before I do anything with the new controls ((HtmlAnchor)(myBrowser.Scene[“lnkViewUserDetails”])).IsOptional=true; myBrowser.ExplorerManager.RunIdentification();
I’m adding another category to the site: “Identity and Fraud”. I like reminding you of how out of control the management of your account information and identity is. Here’s two more great examples of failure on the business side:
After a year of himming and hawing I finally broke down and purchased myself a video card to go with my P4-3.4Ghz PC that I purchased around XMAS 2004. This is how cheap I am: Since I purchased my top of the line PC in 2004 I’ve been running a 16MB PCI video card on it. A brand new system with a piece of crap video card. Kind of defeats the purpose eh?Yeah…I’m cheap. I was holding out for something that would do video-in (for video editing) as well as have a top of the line chipset that could handle the latest game, all for under $200….Rrrrrrright.
I gave up on the video-in, since there are so many external solutions that you can purchase for under $100, and decided to go shopping for the best that money can buy with $200. Co-worker Mr. Alex Scoble pointed me to the massive selections out at NewEgg.com and we filtered our way down to what I considered the best for my needs, the SAPPHIRE Radeon X850XT. The best thing about the 850XT is that I satisfied my cheap “habit” with the low, low price of $164.00. Check out these specifications:
The specs are really impressive for less than $200! We couldn’t find any NVidia cards that could compete in the price range that had 256MB memory, 16 pipelines, and have an interface of 256-bit. Sure the clock speed is not the fastest, but for my gaming needs I choose shading over speed which resulted in this card.
I received the card today and proceeded to install it as soon as I got home. Installation was quick and painless. In little to no time I had my long awaited dual monitors set up and was playing Call of Duty 2. With the game defaults I didn’t see one pause on the first level. For the 2nd level I turned the dial from default to maximum EVERYTHING at 1024×768 which only caused occasional, very tiny pauses.
I somehow find this Super Mario Brothers race more fun and exciting than the 2006 Winter Olympics. What’s wrong with me? I think I find it more interesting because I can relate to it. Think about it, the typical IT guy competes to survive using mouse clicks, response times and wit. I just can’t get into figure skating. For the 2012 IT Olympics I’d like to see the following events:
Double click: “athletes” compete to double click the fastest (left, middle, and right click). Athletes are judged on speed and technique.
Inbox filing: “athletes” compete to file the contents of an inbox into junk, delete, postpone, and act now. Judges score on filing decisions and the possible impact of those decisions on the virtual business.
Windows Installation: “athletes” compete to install Window Vista the fastest (no install scripts allowed). Athletes are judged on install time and ability to multitask during long waits.
What IT events would you like to see in 2012?
Oh, I almost forgot… When I was a kid my cousin was so good at Super Mario Brothers that he could complete the first level with his eyes shut. It was pretty cool to watch. Now that’s what I call skill.
Recently a corrupt SilkPerformer uninstall kept me from re-installing due to the Segue Launcher Service still being present. I’ve never had to uninstall a Windows Service before, but there is a first time for everything. Perusing through the options that the MMC provided me, I saw no clear-cut way to uninstall the problematic service. I had to resort to Googling for it which yielded the following article from WinGuides. Their suggested fix worked well for me, on Server 2003; I was able to successfully uninstall the service. The magic is this:
Stop the service
Open the registry and navigate to:[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services]
Scott Hanselman recently posted a great Podcast titled “Functional Testing Tools Roundup” which focuses on practical tools for functional Web testing. In the Podcast he talks about the technical aspects, benefits, and downfalls of the following tools:
If you are looking for a tool to test Web applications (UI not SOA) this Podcast is for you.
Take a second and look at the list above. Notice that the list is pretty much composed of open source, free, and/or ultra cheap tools. The demand for cheap and smart Web application UI testing tools is high and organizations are starting to push away from the big dogs like Segue and Mercury (i.e. Corillian pretty much uses Ruby/Watir and SWEA/C# for automating UI testing now). This is an awesome, awesome movement if you ask me. There are a lot of different types of solutions out there now and most are cleaner, smaller, less complex and targeted toward a specific crowd. If you spend the time reviewing the different tools you are most likely going to come up with a solution that will fit your need and will save you a lot of money in the long run with things such as tool cost, learning curves and training (take SWEA and me for example).
In the spirit of beatin’ down the big dog, a great paper was recently submitted by Babu M. Narayanan to StickyMinds that outlines the benefits of Open-Source Test Automation (OSTA) in the industry. This is must read if you are skeptical about going with an open-source tool.
Man, I love this stuff! It’s exciting to see so many people and great apps out there making testing easier and faster.
Google Earth and Google Maps have given us a whole new way to express ourselves using their satellite imagery. People are going crazy showing us their art, graffiti, and advertising from the bird’s eye view. I wonder how long it will take before somebody figures out the photographic path and schedule of the satellites. Just think how much graffiti some young, punk, geek could do if he knew when and where the next picture was being taken. Want to make a bet on when the first wedding proposal happens? How can she say “no” to such geekiness?
See Target’s new form of advertising here. See modern day tagging with profanity here. Recently I got in on the craze and put a little advertisement for QAInsight.net on the roof of my house (see blog post picture).
Google has an awesome technology here, but let’s kick it up one more notch. Here’s my challenge to you Google:
Allow registration of land coordinates to the land owner. Require meta-data input such as address, URL, rent or own. Lease city and utility meta-data to corporations: cable, phone, public sewer, FIOS, etc…
Allow people to click on registered coordinates. Clicking directs the user to URL specified by land owner.
Allow the meta-data to be searched and graphed. Imagine the power for house buying, rental search, track the creeping FIOS installation across town…
I love playing around with the DOM and DHTML. I’m old school like that… Don’t make fun of me, you recently started poking around with AJAX which makes you no better than me! 🙂
Add the script above to your Favorites by right clicking this link and selecting “Add to Favorites” in IE or “Bookmark this link” in FireFox. If you add it to your Links toolbar (IE) then it’s only a click away on each page where you need to see the maxlength of textboxes. Look at you now, you one click tester! Happy testing.
Perusing through the latest MSDN Magazine today, I saw an article about another HTTP/HTTPS analysis tool called IEWatch. Tonight I’ve installed the tool and compared the features of IEWatch against my old favorite HTTPWatch (which I previously posted about here). With a brief run through of all the features I found a few cool points and features that HTTPWatch doesn’t have:
Price. IEWatch is $89 (HTTPWatch is $249)
Grouping of all the links, images, scripts, and forms on the page. Clicking of the individual items gives details in the Explorer bar as well as highlights the object in the actual Web page.
Show HTML object in code. Each object can be right clicked on and the actual HTML code for that HTML object will be shown.
HTML spotlight: Click on HTML objects in the actual page to view the code for that object.
Although these are pretty cool features I wouldn’t switch from HTTPWatch. The reason being is that IEWatch is lacking key QA testing features that HTTPWatch has. These are important features that help with my Web application testing. The biggest items that stick out are the easy viewing of:
If all you care about is viewing the HTTP headers and getting a WSYWIG view of a page then IEWatch is for you. If you want to see more details of the HTTP/HTTPS traffic and find all the defects that I describe in my prior post, then in my humble opinion I feel that HTTPWatch is a better fit. Who am I kidding? I’m not humble. Just pay a little more and get more with HTTPWatch. HTTPWatch simply wins the throw-down.