import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys import time
class PythonOrgSearch(unittest.TestCase): def setUp(self): self.driver = webdriver.Chrome('C:\Users\uidk9685\Downloads\chromedriver.exe') # print self.driver time.sleep(0.5) def test_search_in_python_org(self): driver = self.driver # driver.get("http://www.python.org") # self.assertIn("Python", driver.title) # elem = driver.find_element_by_name("q") # elem.send_keys("pycon") # elem.send_keys(Keys.RETURN) # assert "No results found." not in driver.page_source def tearDown(self): pass # self.driver.close() if __name__ == "__main__": unittest.main() [image: Inline image 2] -- Best regards, Sarika Shrivastava Associate Engineer Continental Automotive Components (India) Pvt. Ltd., 8th Floor, Gold Hill Supreme Software Park, Plot No. 21, 22, 27 & 28, Shanthipura Road, Electronics City, Phase II, Hosur Road, Bangalore-560 100 Tel: +919741457409 Mobile: +919741457409 E-Mail: sarika.shrivast...@continental-corporation.com Web: www.continental-corporation.com _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor