Category Archives: Test Automation

Setup Selenium Webdriver Project in Visual Studio with C#

XYou can write your Selenium scripts in C#. It is one of mostly using programming language for Selenium tests. As an IDE, Visual Studio(VS) is the best environment for .net products. You can setup a Selenium running project from scratch by following steps: 1. Create a C# project in Visual Studio: Selenium First 2. Install… Read More »

Selenium Mobile Test Automation Script in Python with Appium

You can automate your Android testcases by Python language and use Appium. to do that, first start Appium server and run following code: # -*- coding: UTF-8 -*- import unittest from appium import webdriver class TestClass(unittest.TestCase):     @classmethod     def setUpClass(self):         desired_caps = {}         desired_caps[‘platformName’] = ‘Android’         desired_caps[‘platformVersion’] = ‘4.4.2’         desired_caps[‘deviceName’]… Read More »

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(“http://www.mahsumakbas.net/selenium”)                  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 »