hi, With Selenium version 3, one of major change is to run Firefox need gecko driver. At below video, you can see how to set up step by step for Java environment.
You can perform Drag and Drop operation in Selenium by its provided Actions APIs. At that link, there are two simple html div elemennts and can drag one to on other element(with jQuery). You can do that with Selenium. To check it is done, there is a text in dropped place. Before drop text is… Read More »
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 »
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 »
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 »
If you have any Select/Option list in your web page, you can do selection by Select operation in Selenium. No need to to go to each option element by any identifier. At below, there are code both for Pyhton and Java. Be Careful to import Select package in your code. Python: # -*- coding: UTF-8… Read More »