Sunday, August 15, 2010

Time to Visit the Harley Gods

It's 9 am and we are heading to the Temple of Harley-Davidson - (pics to come)

Saturday, August 14, 2010

Night Time Fun!!




We took a walk around Milwaukee, I have to say this is the cleanest city in the U.S for sure.

Below is a few pictures we took.




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...