예제 #1
0
 def testGoogle__4(self):
     selenium = self.selenium
     selenium.open("http://www.google.com/webhp?hl=en")
     
     #Verifies that the title matches
     self.assertEqual ("Google", selenium.get_title())
     selenium.type("q", "Selenium OpenQA")
     
     #Verifies that it can find the Selenium website
     self.assertEqual("Selenium OpenQA", selenium.get_value("q"))
     selenium.click("btnG")
     selenium.wait_for_page_to_load("5000")
     self.assertEqual("Selenium OpenQA - Google Search", selenium.get_title())
예제 #2
0
    def testGoogle__4(self):
        selenium = self.selenium
        selenium.open("http://www.google.com/webhp?hl=en")

        #Verifies that the title matches
        self.assertEqual("Google", selenium.get_title())
        selenium.type("q", "Selenium OpenQA")

        #Verifies that it can find the Selenium website
        self.assertEqual("Selenium OpenQA", selenium.get_value("q"))
        selenium.click("btnG")
        selenium.wait_for_page_to_load("5000")
        self.assertEqual("Selenium OpenQA - Google Search",
                         selenium.get_title())
예제 #3
0
    def testKeyPress(self):
        selenium = self.selenium
	input_id = 'ac4'
	update_id = 'ac4update'

	selenium.open("http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html")
        selenium.key_press(input_id, 74)
	time.sleep(0.5)
        selenium.key_press(input_id, 97)
        selenium.key_press(input_id, 110)
	time.sleep(0.5)
        self.failUnless('Jane Agnews' == selenium.get_text(update_id))
        selenium.key_press(input_id, '\9')
	time.sleep(0.5)
        self.failUnless('Jane Agnews' == selenium.get_value(input_id))
예제 #4
0
    def testKeyPress(self):
        selenium = self.selenium
	input_id = 'ac4'
	update_id = 'ac4update'

	selenium.open("http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html")
        selenium.key_press(input_id, 74)
	time.sleep(0.5)
        selenium.key_press(input_id, 97)
        selenium.key_press(input_id, 110)
	time.sleep(0.5)
        self.failUnless('Jane Agnews' == selenium.get_text(update_id))
        selenium.key_press(input_id, '\9')
	time.sleep(0.5)
        self.failUnless('Jane Agnews' == selenium.get_value(input_id))