Monthly Archives: September 2015

Different Between close() and quit() Functions in Selenium Webdriver

In Selenium, after you start a browser(by Webdriver object) you need to close it. For this purposes there are two methods. close() and quit() What is different between them? İ see most example with close() and someone with quit(). Actually, they are almost similar and destroy web browser objects. Only different is: close() destroy current… Read More »

Take Screenshot with Selenium Webdriver

You can take screenshot of browser with browser. Python: you can use get_screenshot_as_file(path_to_save). # -*- coding: UTF-8 -*- import unittest from selenium import webdriver class TestClass(unittest.TestCase):     def setUp(self):         self.driver = webdriver.Firefox()          def test_MahsumAkbasNet_Pass(self):                  self.driver.get(“”)                  self.driver.save_screenshot(“D:\\python_selenium_screenshot.jpg”)              def tearDown(self):         self.driver.quit() if __name__… Read More »

Run Selenium Scripts with Jenkins CI

You write your automation script, they are working perfectly anf got perfect result. But, will you run script everytime manually? Solution is Continuous Integration tools. Most known is Jenkins. Let’s setup a job to run our test. Open Jenkins homepage Click on New Item link at left-top corner Because of we have a simple python… Read More »