Saturday, August 14, 2010

Day One Milwaukee



We got a great room a the Hyatt Regency, actually the least expensive downtown.




View from the Room




We Had lunch on the water at Rock Bottom, awesome,place, food and beer!!
This is the view of where we were sitting.




Tuesday, August 10, 2010

Road Trip 2010 - Rob and Autumn's Cross Country Redneck Adventure!










Harley-Davidson Museum in Milwaukee, WI


Planning a road trip to visit the Harley-Davidson Museum in Milwaukee, WI and the Iowa State Fair a couple days later.

This is a one week trip so we will be moving fairly quickly to see everything.













Iowa State Fair 2010

This will be our first time visiting the fair so we are not sure what to expect but it should be fun!
Looks like it's going to be quite the family adventure!

Thursday Aug- 12 2010 - The Day Before:
It's Thursday and we are already gearing to go.
Getting every thing in order. Hotel in Milwaukee is already paid for so
we know we have a place to crash when we get there.

I will be backing up the car tomorrow while Autumn works
Then at 5pm sharp we are on our way!!

Friday Aug-13-10
Counting down to take-off. Finished changing the oil and filter, Car is 3/4 packed a few last items left. Soon as Autumn gets out of work we will be on our way. I will post pictures of our trip each day soon check back soon!!

Tuesday, February 9, 2010

Selenium - Handling Dialogs with Python

I am currently scripting Selenium tests using Python (selenium.py)
One of the main issues I have found are looping, parametrization and handling modal dialogs

Dialogs:

Dialog boxes are invisible to selenium, it just can't see them.
The reason is the dialogs are native to the operating system you are running.
Selenium only identifies the web components (elements)

In Internet Explorer I created a work around for handling dialogs in Python such as File Download, SaveAs, Save and Close. This workaround could also be used for other dialogs.
Although this may not be the most elegant method it works for me.


import os, sys, time
import win32com
from pywinauto import application
import winGuiAuto as wga
import time
import SendKeys
import win32gui
import win32con


###############################
class AutoTools:
def __init__(self):

self.app = application.Application()


def clickFileDL(self):
"""
Find the Download Dialog and Click "Save"
"""
time.sleep(5)

# Draw and Outline so I know it's the right control and give focus to the control
self.app.FileDownload["&Save"].DrawOutline()
time.sleep(1)
# Click the Save Button
self.app.FileDownload["&Save"].ClickInput()
time.sleep(1)
# Get a Handle to the File Download Window by title
hwnd = wga.findTopWindow(wantedText="File Download")
time.sleep(1)
# Simulate Mouse Down and Mouse Up
win32gui.SendMessage(hwnd, win32con.WM_LBUTTONDOWN, 0, 0)
# Important timing issue between clicks
time.sleep(2)
win32gui.SendMessage(hwnd, win32con.WM_LBUTTONUP, 0, 0)
#
SendKeys.SendKeys("""{ENTER}""")

def clickSaveAs(self):
"""
Find the Save As Dialog and Click "Save"
"""
time.sleep(1)
self.app.SaveAs.PrintControlIdentifiers()
self.app.SaveAs.ComboBox3.Select("All Files")
# Find the Save As Dialog and Click "Save"
self.app.SaveAs.Save.DrawOutline()
time.sleep(1)
self.app.SaveAs["&Save"].ClickInput()
time.sleep(1)
SendKeys.SendKeys("""{ENTER}""")


def clickDLClose(self):
"""
Find the Downloadcomplete Dialog and Click "Close"
"""

time.sleep(1)
# Find the Download complete Dialog and Click "Close"
time.sleep(2)
SendKeys.SendKeys("""{ENTER}""")

#########################################

Refs:
http://pywinauto
.openqa.org/

http://www.brunningonline.net/simon/blog/.../winGuiAuto.py.html


Next I will explain how to use Autoit with FireFox to handle dialogs...

Sunday, December 27, 2009

Selenium and Python

I have been working on Selenium at my latest project and I found that selenium of course is not capable of controlling IE dialogs such as File Download and SaveAs. So far in Python I have been able to work around this but using a combination of pyWinAuto.py,SendKeys and winGuiAuto

You have to get focus to the control, Send and Up/down mouse command and and "ENTER" command. I have know idea why it takes all those commands but it works.

I have also written a reporting tool for Selenium that show how many test have been run and the results in HTML format.

Selenium is nice if you have to automate many browsers such as IE and Firefox.

Friday, April 17, 2009

Working with WinForm dataGridViews and QuickTest Pro

With Quick Test Pro I found the example below works the best when you want to select and click the cell.

' Select the cell row 0 column zero
SwfWindow("myForm").SwfTable("dataGridView1").SelectCell 0,0

' Click the cell row 0 column zero
SwfWindow("myForm").SwfTable("dataGridView1").ClickCell 0,0

Minimize the QuickTest Pro window

Here is a quick way to Minimize the QuickTest Pro window when running tests

' Minimize the QuickTest Pro window
Public Function MinimizeQTPWindow ()
Set qtApp = getObject("","QuickTest.Application")
qtApp.WindowState = "Minimized"
Set qtApp = Nothing
End Function

Logic Studio Pro 8

Well I finally broke down and decide to buy Logic Studio Pro 8. It has a done of features that will take me a bit to utilize. I can now do some quality recordings

My current music editing system is:
Hardware:
20 " Intel based IMac - 3Gig mem, 2.0 GHz Dual Core
140 gig usb external drive
60 gig usb external drive
M-Audio audio interface
Behringer Mixer PreAmp
Software:
Logic Studio Pro 8
Garageband
Audacity

Music Site: myspace.com/musicofbericlak

I found Audacity and excellent tool for audio editing and capture samples.
Hopefully soon I can gave some demos for all to hear