django-selenium Documentation

Similar documents
selenose Documentation

Django-frontend-notification Documentation

django-cron Documentation

django-jenkins Documentation

django-intercom Documentation

django-celery Documentation

tally Documentation Release Dan Watson

Tangent MicroServices Documentation

gocept.selenium Release 3.0

Django IPRestrict Documentation

django-password-reset Documentation

django-openid Documentation

Django File Picker Documentation

webtest-selenium Documentation

Django Admin Sortable Documentation

Django Groups Manager Documentation

django-reinhardt Documentation

Django Groups Manager Documentation

django-teamwork Documentation

django-app-metrics Documentation

django-mongonaut Documentation

django-notifier Documentation

Django File Picker Documentation

Getting Django Set Up Using a Functional Test

staff Documentation Release 1.2

django-precise-bbcode Documentation

Selenium Training. Training Topics

Statirator Documentation

Microsoft Office Free download for Students

django-audiofield Documentation

django-sticky-uploads Documentation

SELENIUM TRAINING COURSE CONTENT

Djam Documentation. Release Participatory Culture Foundation

Django Standalone Apps

Bambu API Documentation

Django MFA Documentation

Easy-select2 Documentation

Selenium Course Content

Bricks Documentation. Release 1.0. Germano Guerrini

Chrome if I want to. What that should do, is have my specifications run against four different instances of Chrome, in parallel.

django-allauth-2fa Documentation

Remote Desktop Services

Step 4 Part F - How to Download a Video on YouTube and Delete a Video

But before understanding the Selenium WebDriver concept, we need to know about the Selenium first.

Gargoyle Documentation

django-embed-video Documentation

django-slim Documentation

alphafilter Documentation

Django Test Utils Documentation

DJOAuth2 Documentation

neo4django Documentation

Behat Drupal Integration Documentation

django-konfera Documentation

django-avatar Documentation

Selenium Testing Course Content

Building a Django Twilio Programmable Chat Application

Configure Eclipse with Selenium Webdriver

Django-Select2 Documentation. Nirupam Biswas

django simple pagination Documentation

django-embed-video Documentation

django-ad-code Documentation

turbo-hipster Documentation

open-helpdesk Documentation

behave-webdriver Documentation

django-audit-log Documentation

MIT AITI Python Software Development Lab DJ1:

FCS Documentation. Release 1.0 AGH-GLK

django-embed-video Documentation

Step 7 How to convert a YouTube Video to Music As I mentioned in the YouTube Introduction, you can convert a Video to a MP3 file using Free Video To

django-secure Documentation

Django CBTools Documentation

django-messages Documentation

Stepic Plugins Documentation

Installation Guide for Kurzweil 3000 Web License (Visual Walkthrough) Windows Version 15

1. Go to the URL Click on JDK download option

Installation Guide for Kurzweil 3000 Web License (Visual Walkthrough) Windows Version 15

Writing a Django e- commerce framework OSCON 2012

Rapid Development with Django and App Engine. Guido van Rossum May 28, 2008

Getting Started with Employee Access

Tomasz Szumlak WFiIS AGH 23/10/2017, Kraków

django-mama-cas Documentation

Welcome to UCC Tolland s Church Directory

Graphene Documentation

Step 5 How to download free Music from YouTube You need a YouTube account to download free Music from YouTube. If you don t have a YouTube account,

Spade Documentation. Release 0.1. Sam Liu

Release 0.8. Repoze Developers

Django Map Widgets Documentation

Selenium. Duration: 50 hrs. Introduction to Automation. o Automating web application. o Automation challenges. o Automation life cycle

The age of automation is going to be the age of 'do it yourself. - Marshall McLuhan

djangotribune Documentation

Quick Note 24. Extracting the debug.txt file from a TransPort. Digi Technical Support. February Page 1

Technology modeling. Ralf Lämmel Software Languages Team University of Koblenz-Landau

owncloud Android App Manual

django-oauth2-provider Documentation

VMware Workspace Portal End User Guide

django-fluent-dashboard Documentation

WebDrive Installation Guide

Getting Started with Office 365

django-dajax Documentation

django-ratelimit-backend Documentation

Transcription:

django-selenium Documentation Release 0.9.5 Roman Prokofyev Sep 27, 2017

Contents 1 Django 1.4 note 3 2 What is it? 5 3 Dependencies 7 4 How to use it 9 4.1 Local................................................... 9 4.2 Remote.................................................. 9 4.3 Common................................................. 10 5 Django Jenkins 11 6 MyDriver class 13 7 South 15 8 Indices and tables 17 i

ii

django-selenium Documentation, Release 0.9.5 Contents Welcome to django-selenium s documentation! Django 1.4 note What is it? Dependencies How to use it * Local * Remote * Common Django Jenkins MyDriver class South Indices and tables Contents 1

django-selenium Documentation, Release 0.9.5 2 Contents

CHAPTER 1 Django 1.4 note Django 1.4 got built-in selenium support, and you can continue to use django-selenium with it, while keeping the same shortcut webdriver functions. How to use django-selenium on django 1.4: specify preferred webdriver in the SELENIUM_DRIVER setting create test classes subclassing the SeleniumLiveTestCase inside the standard tests.py file. 3

django-selenium Documentation, Release 0.9.5 4 Chapter 1. Django 1.4 note

CHAPTER 2 What is it? Django-selenium is a library that provides seamless integration for Django framework with a Selenium testing tool. Additionally it provides syntactic sugar for writing and maintaining selenium tests (see MyDriver class section). It allows to write and execute selenium tests just as normal ones. 5

django-selenium Documentation, Release 0.9.5 6 Chapter 2. What is it?

CHAPTER 3 Dependencies Django 1.3 and above. Selenium 2.5.0 and above. django-jenkins if you are going to use JenkinsTestRunner from this package. 7

django-selenium Documentation, Release 0.9.5 8 Chapter 3. Dependencies

CHAPTER 4 How to use it Define selenium specific settings in your settings.py file. Local Local run in this case means that you re using Firefox, Chrome or IE driver, and therefore you don t need running selenium server, because these drivers work with the browsers directly. So, if you plan to use selenium locally, then you should define the following settings: Set SELENIUM_DISPLAY if you plan to run selenium tests on display other than :0 (on VNCServer/Xvfb for example). See settings.py for other settings available. Set SELENIUM_DRIVER for corresponding browser driver in selenium. Optionally, set SELENIUM_DRIVER_OPTS as a dictionary with options to be passed to the selenium webdriver. This option can be used for instance to pass a custom firefox profile path to be used, or a custom path for chromedriver. See the Selenium webdriver s drivers page for more information. Remote Set SELENIUM_DRIVER = 'Remote' in your settings file. Set SELENIUM_CAPABILITY to the desired value. Probaly set SELENIUM_PATH to point to the selenium-server.jar on your system, for example /home/ dragoon/selenium-server-2.6.jar. This setting is required if you want to start selenium server along with tests. You don t need this if you keep your selenium server running using other methods. Set SELENIUM_HOST to point to the IP/hostname of your remote selenium server. Set SELENIUM_TESTSERVER_HOST to the IP address/hostname of the machine where test server is running (e.g. 192.168.1.2). 9

django-selenium Documentation, Release 0.9.5 See settings.py file to see some examples. Common 1. Set TEST_RUNNER = 'django_selenium.selenium_runner.seleniumtestrunner' or subclass SeleniumTestRunner to make your own test runner with extended functionality. 2. Write some selenium tests for your apps in a module seltests.py. Subclass selenium tests from django_selenium.testcases.seleniumtestcase. 3. Add custom management command to override default test command: from django_selenium.management.commands import test_selenium class Command(test_selenium.Command): def handle(self, *test_labels, **options): super(command, self).handle(*test_labels, **options) Place it somewhere in your app in management/commands/test.py (don t forget the init.py files in each directory) 5. Run manage.py test like you normally do. Now you have two extra options: --selenium and --selenium-only. First runs selenium-specific tests after the usual ones, the last runs only selenium tests. And that s it. To see the integration in action, check out the test application included in the source. 10 Chapter 4. How to use it

CHAPTER 5 Django Jenkins There is also a special test runner to execute selenium tests using django-jenkins integration: django_selenium. jenkins_runner.jenkinstestrunner. You can specify this class for JENKINS_TEST_RUNNER setting, and manage.py jenkins command will also execute selenium tests and generate reports for them. 11

django-selenium Documentation, Release 0.9.5 12 Chapter 5. Django Jenkins

CHAPTER 6 MyDriver class MyDriver class from django_selenium.testcases offers extended functionality on top of selenium. webdriver.remote.webdriver.webdriver class. This class contains a number of convenient shortcuts to handle frequently used operations described below: 13

django-selenium Documentation, Release 0.9.5 14 Chapter 6. MyDriver class

CHAPTER 7 South You use South to migrate your applications? Ok, south is also overriding the django test commands, therefore you will need to modify your custom management command as follows: from django_selenium.management.commands import test_selenium from south.management.commands import test as test_south class Command(test_south.Command, test_selenium.command): def handle(self, *test_labels, **options): super(command, self).handle(*test_labels, **options) In addition, you need to set the following: SOUTH_TESTS_MIGRATE = False in your test_settings.py if you called your command test (test.py), then the app containing your command should come after the south in the INSTALLED_APPS list. 15

django-selenium Documentation, Release 0.9.5 16 Chapter 7. South

CHAPTER 8 Indices and tables genindex modindex search 17