rom selenium import selenium
import unittest, time, re, sys, bdata, blib, types, utility
Home_URL="
https://www.google.com/"
New_userName=""
New_password=""
class Clean_gmail(unittest.TestCase):
def setUp(self):
self.verificationErrors = []
self.selenium = selenium("localhost",
4444,bdata.BrowserType,Home_URL)
self.selenium.start()
def test_clean_gmail(self):
sel = self.selenium
sel.open("/accounts/")
sel.click("link=Gmail")
sel.wait_for_page_to_load("30000")
try: self.failUnless(sel.is_text_present("Welcome to Gmail"))
except AssertionError, e:
self.verificationErrors.append(str(e))
sel.select_window("null")
sel.type("Email", bdata.gmailEmail)
sel.type("Passwd", bdata.gmailPassword)
sel.click("signIn")
sel.wait_for_page_to_load("50000")
if __name__ == "__main__":
unittest.main()
On Dec 30, 1:30 am, santosh h s <
santosh.s...@gmail.com> wrote:
> Hi All,
> I am trying to launch
gmail.com using selenium and python below is my
> code
>
> from selenium import selenium
> import time
> def sel_start():
> global sel
> sel = selenium("localhost", 4444, "iexplore", "
http://www.gmail.com")
> sel.start()
> sel.open("
http://www.gmail.com")
> time.sleep(5)
> sel.wait_for_page_to_load("30000")
>
> def tearDown(sel):
> sel.stop()
>
> sel_start()
> tearDown(sel)
>
> but his doesn't work and throws me an error.i thin this is because
> when i launchhttp://www.gmail.comit redirects to https://