Skip to content

felix-d/simple-nose-selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-nose-selenium *************

A simple Selenium WebDriver plugin for nose.

This plugin is a python3 only stripped down version of nose-selenium.

nosetests command line options

$ nosetests --with-simple-nose-selenium --help
Usage: nosetests [options]

Options:
  ...
  --with-simple-nose-selenium   Enable plugin Simple Nose Selenium
  --browser=BROWSER             Run this type of browser (default ['FIREFOX'], options:
                                [FIREFOX,  CHROME, SAUCELABS]

Example Commands

$ nosetests --with-simple-nose-selenium --browser=FIREFOX

To run your tests on Saucelabs you need to set the required environment variables first.

$ export SAUCELABS_USERNAME=foo
$ export SAUCELABS_ACCESSKEY=123key
$ export SAUCELABS_PLATFORM=windows
$ export SAUCELABS_BROWSER_NAME=chrome
$ export SAUCELABS_BROWSER_VERSION=4.1
$ nosetests --with-simple-nose-selenium --browser=SAUCELABS

Inheriting from SeleniumTestCase

SeleniumTestCase creates the webdriver and stores it in self.wd in its setUp() and closes it in tearDown().

from nose_selenium import SeleniumTestCase


class MyTestCase(SeleniumTestCase):

    def test_that_google_opens(self):
        self.wd.get("http://google.com")
        self.assertEqual(self.wd.title, "Google")

About

A simple Selenium plugin to run your TestCase's in different browsers and Saucelabs in python3

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages