Showing posts with label mobile wireless test automation. Show all posts
Showing posts with label mobile wireless test automation. Show all posts
Monday, 3 December 2007
Sample python code Exercise 04 prettified
""" Markup Example 04
Adding the accept header for xHTML
author: Julian Harty
edited: 03 December 2007
"""
import urllib
import BeautifulSoup
request = urllib.FancyURLopener()
request.addheader('Accept', 'application/xhtml+xml')
response = request.open("http://www.google.co.uk/m")
content = response.read()
# Display the formatted contents
soup = BeautifulSoup.BeautifulSoup(content)
print soup.prettify()
# write the content to a file so it can be displayed in a browser
f = open("markup_ex04_prettified.xml", "wb")
f.write(content)
f.close()
Mobile Wireless Test Automation at EuroSTAR2007
I will be presenting on this topic at the EuroSTAR 2007 conference as a 1/2 day tutorial on Tuesday 4th December 2007. I expect to learn as much as I present from the 70+ participants who have booked to join me. Thank you all :)
Subscribe to:
Posts (Atom)