#!/usr/bin/env python
#--*--coding:UTF-8 --*--

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

navigator = "firefox"

url = "https://outlook.office.com"
size = None
img = "primera_pantalla.png"

if navigator == "firefox" :
	browser = webdriver.Firefox()
elif navigator == "chrome":
	browser = webdriver.Chrome()
elif navigator == "ie":
	browser = webdriver.Ie()
else :
	raise Exception("imposible encontrar el navegador")

print "abierto navegador size=\n", size
browser.get(url)
browser.get_screenshot_as_file(img)
browser.quit()

#if size != None :
#print "ya abierto navegador en if de size\n"
#	browser.set_window_size(size[0],size[1])
#	browser.get(url)
#browser.get_screenshot_as_file(img)
#	browser.quit()
