summaryrefslogtreecommitdiffstats
path: root/chrome/test/webdriver/chromedriver_tests.py
blob: 2e99b14f723bad946d9dd9c3b1df542cb1afd4e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/python

# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""Tests for ChromeDriver.

If your test is testing a specific part of the WebDriver API, consider adding
it to the appropriate place in the WebDriver tree instead.
"""

import os
import sys
import unittest

from chromedriver_launcher import ChromeDriverLauncher
import chromedriver_paths
from gtest_text_test_runner import GTestTextTestRunner

sys.path += [chromedriver_paths.PYTHON_BINDINGS]

from selenium.webdriver.remote.webdriver import WebDriver


class ChromeDriverTest(unittest.TestCase):
  def setUp(self):
    self._launcher = ChromeDriverLauncher()

  def testSessionCreationDeletion(self):
    driver = WebDriver(self._launcher.GetURL(), 'chrome', 'any')
    driver.quit()


if __name__ == '__main__':
  unittest.main(module='chromedriver_tests',
                testRunner=GTestTextTestRunner(verbosity=1))