Permalink
Browse files

Update travis conf (#678)

  • Loading branch information...
1 parent 461a495 commit a2b3df4c5542425a0d15bffd0278c98b0f1c2057 @drobota drobota committed with aaltat Dec 10, 2016
View
@@ -2,24 +2,51 @@ addons:
firefox: latest-esr
language: python
sudo: false
-python:
- - "2.7"
install:
- #- pip install pep8 --use-mirrors
- #- pip install pyflakes --use-mirrors
- - pip install robotframework
- - pip install selenium==2.53.6
- - pip install decorator
- - pip install mockito
- #- "if [[ ${BROWSER} == 'ie' ]]; then pip install ie_only_pkg; fi"
+ - pip install .
+ - pip install -r requirements.txt
+ - pip install -r requirements-dev.txt
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
- - "firefox --version"
- - "python test/run_tests.py python $BROWSER --noncritical known_issue_-_travisci"
+ - "if [[ -n ${SELENIUM_VERSION+x} ]]; then pip install -U selenium==${SELENIUM_VERSION}; fi"
+ - "python test/run_tests.py python \"$BROWSER\""
env:
- matrix:
- - BROWSER=firefox
- #- BROWSER=ie # will be added when we have completed SauceLabs CI
- #- BROWSER=safari # will be added after #247 merged
+ global:
+ - secure: "QyY0j8C+hVhsGLv4YU0UMvLm5wBDg6xT5J0Ee77C/JAQ6vcdCMpTfWI8oDxTZb7pBhpDkYuNe747yCYF5PrdBYQbO08FilxctReuJfMXcH44rZC5q49mUmPamkvg1LkzIWuC1s9uKnjlvyDT5ojuPXZl2Vn0gIhSIg+yOyBkM1U="
+ - secure: "HJaJTYauaBZODMDkbnRVsiCk+t2uVtztkkJ5V4dXSnE1uIBms2PVbufQwb+YNvzHkGheLtpnt/hLM1HhmSFgUtOCf+eumQ6kaLR2KRVEysXwWJzgZoLBidNBOy5rvAIsc9JJbDaIgYVGzyaJGTP9AMb8CyvIPE//lH10sf+GB7g="
+matrix:
+ include:
+ - os: linux
+ env:
+ - BROWSER=firefox
+ - SELENIUM_VERSION=2.53.6
+ addons:
+ firefox: "47.0.1"
+ python: "2.7"
+ - os: linux
+ env:
+ - BROWSER=chrome
+ addons:
+ sauce_connect: true
+ python: "2.7"
+ - os: linux
+ env:
+ - BROWSER=firefox
+ - SELENIUM_VERSION=2.53.6
+ addons:
+ sauce_connect: true
+ python: "3.4"
+ - os: linux
+ env:
+ - BROWSER="internet explorer"
+ addons:
+ sauce_connect: true
+ python: "2.7"
+ - os: linux
+ env:
+ - BROWSER=safari
+ addons:
+ sauce_connect: true
+ python: "2.7"
View
@@ -1,3 +1,3 @@
decorator >= 3.3.2
-selenium >= 2.32.0
+selenium
robotframework >= 2.6.0
View
@@ -1,7 +1,6 @@
#!/usr/bin/env python
from os.path import abspath, dirname, join
-
from setuptools import setup
@@ -5,8 +5,16 @@
from Selenium2Library import utils
from Selenium2Library.locators import ElementFinder
from Selenium2Library.locators import CustomLocator
+from Selenium2Library.keywords.keywordgroup import KeywordGroup
-from .keywordgroup import KeywordGroup
+try:
+ basestring # attempt to evaluate basestring
+
+ def isstr(s):
+ return isinstance(s, basestring)
+except NameError:
+ def isstr(s):
+ return isinstance(s, str)
class _ElementKeywords(KeywordGroup):
@@ -358,9 +366,11 @@ def click_element_at_coordinates(self, locator, xoffset, yoffset):
"""
self._info("Click clicking element '%s' in coordinates '%s', '%s'." % (locator, xoffset, yoffset))
element = self._element_find(locator, True, True)
- #self._element_find(locator, True, True).click()
- #ActionChains(self._current_browser()).move_to_element_with_offset(element, xoffset, yoffset).click().perform()
- ActionChains(self._current_browser()).move_to_element(element).move_by_offset(xoffset, yoffset).click().perform()
+ action = ActionChains(self._current_browser())
+ action.move_to_element(element)
+ action.move_by_offset(xoffset, yoffset)
+ action.click()
+ action.perform()
def double_click_element(self, locator):
"""Double click element identified by `locator`.
@@ -389,11 +399,10 @@ def drag_and_drop(self, source, target):
Examples:
| Drag And Drop | elem1 | elem2 | # Move elem1 over elem2. |
"""
- src_elem = self._element_find(source,True,True)
- trg_elem = self._element_find(target,True,True)
+ src_elem = self._element_find(source, True, True)
+ trg_elem = self._element_find(target, True, True)
ActionChains(self._current_browser()).drag_and_drop(src_elem, trg_elem).perform()
-
def drag_and_drop_by_offset(self, source, xoffset, yoffset):
"""Drags element identified with `source` which is a locator.
@@ -404,7 +413,9 @@ def drag_and_drop_by_offset(self, source, xoffset, yoffset):
| Drag And Drop By Offset | myElem | 50 | -35 | # Move myElem 50px right and 35px down. |
"""
src_elem = self._element_find(source, True, True)
- ActionChains(self._current_browser()).drag_and_drop_by_offset(src_elem, xoffset, yoffset).perform()
+ action = ActionChains(self._current_browser())
+ action.drag_and_drop_by_offset(src_elem, xoffset, yoffset)
+ action.perform()
def mouse_down(self, locator):
"""Simulates pressing the left mouse button on the element specified by `locator`.
@@ -582,7 +593,6 @@ def mouse_down_on_image(self, locator):
def page_should_contain_image(self, locator, message='', loglevel='INFO'):
"""Verifies image identified by `locator` is found from current page.
-
See `Page Should Contain Element` for explanation about `message` and
`loglevel` arguments.
@@ -723,7 +733,7 @@ def _is_enabled(self, locator):
return True
def _is_text_present(self, text):
- locator = "xpath=//*[contains(., %s)]" % utils.escape_xpath_value(text);
+ locator = "xpath=//*[contains(., %s)]" % utils.escape_xpath_value(text)
return self._is_element_present(locator)
def _is_visible(self, locator):
@@ -759,22 +769,22 @@ def _map_ascii_key_code_to_key(self, key_code):
def _map_named_key_code_to_special_key(self, key_name):
try:
- return getattr(Keys, key_name)
+ return getattr(Keys, key_name)
except AttributeError:
- message = "Unknown key named '%s'." % (key_name)
- self._debug(message)
- raise ValueError(message)
+ message = "Unknown key named '%s'." % (key_name)
+ self._debug(message)
+ raise ValueError(message)
def _parse_attribute_locator(self, attribute_locator):
parts = attribute_locator.rpartition('@')
if len(parts[0]) == 0:
raise ValueError("Attribute locator '%s' does not contain an element locator." % (attribute_locator))
if len(parts[2]) == 0:
raise ValueError("Attribute locator '%s' does not contain an attribute name." % (attribute_locator))
- return (parts[0], parts[2])
+ return parts[0], parts[2]
def _is_element_present(self, locator, tag=None):
- return (self._element_find(locator, True, False, tag=tag) is not None)
+ return self._element_find(locator, True, False, tag=tag) is not None
def _page_contains(self, text):
browser = self._current_browser()
@@ -791,7 +801,6 @@ def _page_contains(self, text):
browser.switch_to_default_content()
if found_text:
return True
-
return False
def _page_should_contain_element(self, locator, tag, message, loglevel):
@@ -7,10 +7,11 @@ Library Collections
Create Webdriver Creates Functioning WebDriver
[Documentation] LOG 2:1 INFO REGEXP: Creating an instance of the \\w+ WebDriver
... LOG 2:4 DEBUG REGEXP: Created \\w+ WebDriver instance with session id (\\w|-)+
+ [Tags] Known Issue Chrome Known Issue Internet Explorer Known Issue Safari
[Setup] Set Driver Variables
Create Webdriver ${DRIVER_NAME} kwargs=${KWARGS}
- Go To ${FRONT PAGE}
- Page Should Contain needle
+ Go To ${FRONT_PAGE}
+ Wait Until Page Contains needle 5s
[Teardown] Close Browser
Create Webdriver With Bad Driver Name
@@ -12,7 +12,7 @@ Click Element
Double Click Element
[Documentation] LOG 2 Double clicking element 'doubleClickButton'.
- [Tags] Known Issue - Firefox
+ [Tags] Known Issue Safari Known Issue Firefox
Double Click Element doubleClickButton
Element Text Should Be output double clicked
@@ -7,7 +7,9 @@ Resource ../resource.robot
*** Test Cases ***
Click Element At Coordinates
[Documentation] LOG 2 Click clicking element 'Clickable' in coordinates '10', '20'.
- [Tags] Known Issue - Firefox
+ [Tags] Known Issue Firefox
+ ... Known Issue Internet Explorer
+ ... Known Issue Safari
Click Element At Coordinates Clickable ${10} ${20}
Element Text Should Be outputX 110
Element Text Should Be outputY 120
@@ -31,6 +31,7 @@ App Sees Cookie Set By Selenium
Delete Cookie
[Documentation] Delete Cookie
+ [Tags] Known Issue Safari
Delete Cookie test
${cookies} = Get Cookies
Should Be Equal ${cookies} another=value
@@ -42,6 +43,7 @@ Non-existent Cookie
Get Cookies When There Are None
[Documentation] Get Cookies When There Are None
+ [Tags] Known Issue Safari
Delete All Cookies
${cookies}= Get Cookies
Should Be Equal ${cookies} ${EMPTY}
@@ -72,11 +72,12 @@ Get Vertical Position
Get Element Size
- ${width} ${height}= Get Element Size link=Link
- Should be True ${height} > ${0}
- Should be True ${width} > ${0}
- Run Keyword And Expect Error ValueError: Element locator 'non-existent' did not match any elements. Get Element Size non-existent
+ ${width} ${height}= Get Element Size link=Link
+ Should be True ${height} > ${0}
+ Should be True ${width} > ${0}
+ Run Keyword And Expect Error ValueError: Element locator 'non-existent' did not match any elements. Get Element Size non-existent
Get Empty Element Size
+ [Tags] Known Issue Internet Explorer
${width} ${height}= Get Element Size id=emptyDiv
- Should be True ${height} == 0
+ Should be True ${height} == 0
@@ -60,6 +60,7 @@ Click button created with <button> by tag content
Choose File
[Documentation] Choose File
[Setup] Navigate To File Upload Form And Create Temp File To Upload
+ [Tags] Known Issue Internet Explorer Known Issue Safari
Choose File file_to_upload ${CURDIR}${/}temp.txt
${dep_browser}= Set Variable If
... '${BROWSER}'.lower() == 'ff' or '${BROWSER}'.lower() == 'firefox'
@@ -12,6 +12,7 @@ Clicking Elements Should Activate Javascript
Alert Should Be Present
[Documentation] Alert Should Be Present
+ [Tags] Known Issue Safari
[Setup] Go To Page "javascript/alert.html"
Click Link Click Me!
Alert Should Be Present
@@ -23,6 +24,7 @@ Alert Should Be Present
Get Alert Message
[Documentation] Get Alert Message
+ [Tags] Known Issue Safari
[Setup] Go To Page "javascript/alert.html"
Click Link Click Me!
${msg} = Get Alert Message
@@ -31,6 +33,7 @@ Get Alert Message
Read Alert Message
[Documentation] Read Alert Message
+ [Tags] Known Issue Safari
[Setup] Go To Page "javascript/alert.html"
Click Link Click Me!
${msg} = Get Alert Message ${FALSE}
@@ -40,6 +43,7 @@ Read Alert Message
Input Text Into Prompt
[Documentation] Input Text Into Prompt
+ [Tags] Known Issue Safari
[Setup] Go To Page "javascript/alert_prompt.html"
Click Element css=button
Input Text Into Prompt myname
@@ -48,7 +52,7 @@ Input Text Into Prompt
Mouse Down On Link
[Documentation] Mouse Down On Link
- [Tags] Known Issue - Firefox
+ [Tags] Known Issue Safari Known Issue Firefox
[Setup] Go To Page "javascript/mouse_events.html"
Mouse Down On Image image_mousedown
Text Field Should Contain textfield onmousedown
@@ -60,13 +64,15 @@ Mouse Down On Link
Confirm Action
[Documentation] Confirm Action
+ [Tags] Known Issue Safari
Click Button Change the title
${msg}= Confirm Action
Title Should Be Changed after confirmation
Should Be Equal ${msg} Really change the title?
Cancel Action
[Documentation] Cancel Action
+ [Tags] Known Issue Safari
Choose Cancel On Next Confirmation
Click Button Change the title
${msg}= Confirm Action
@@ -88,19 +94,21 @@ Execute Javascript from File
Open Context Menu
[Documentation] Open Context Menu
- [Tags] Known Issue - Firefox
+ [Tags] Known Issue Safari Known Issue Firefox
Go To Page "javascript/context_menu.html"
Open Context Menu myDiv
Drag and Drop
[Documentation] Drag and Drop
+ [Tags] Known Issue Internet Explorer Known Issue Safari
[Setup] Go To Page "javascript/drag_and_drop.html"
Element Text Should Be id=droppable Drop here
Drag and Drop id=draggable id=droppable
Element Text Should Be id=droppable Dropped!
Drag and Drop by Offset
[Documentation] Drag and Drop by Offset
+ [Tags] Known Issue Internet Explorer Known Issue Safari
[Setup] Go To Page "javascript/drag_and_drop.html"
Element Text Should Be id=droppable Drop here
Drag and Drop by Offset id=draggable ${1} ${1}
@@ -2,6 +2,7 @@
Documentation Tests lists
Test Setup Go To Page "forms/prefilled_email_form.html"
Resource ../resource.robot
+Force Tags Known Issue Internet Explorer
*** Test Cases ***
Get List Items From Single-Select List
@@ -2,32 +2,33 @@
Documentation Tests mouse
Test Setup Go To Page "mouse/index.html"
Resource ../resource.robot
+Force Tags Known Issue Internet Explorer
*** Test Cases ***
Mouse Over
[Documentation] Mouse Over
- [Tags] Known Issue - Firefox
+ [Tags] Known Issue Safari Known Issue Firefox
Mouse Over el_for_mouseover
Textfield Value Should Be el_for_mouseover mouseover el_for_mouseover
Run Keyword And Expect Error ERROR: Element not_there not found. Mouse Over not_there
Mouse Out
[Documentation] Mouse Out
- [Tags] Known Issue - Firefox
+ [Tags] Known Issue Safari Known Issue Firefox
Mouse Out el_for_mouseout
Textfield Value Should Be el_for_mouseout mouseout el_for_mouseout
Run Keyword And Expect Error ERROR: Element not_there not found. Mouse Out not_there
Mouse Down
[Documentation] Mouse Down
- [Tags] Known Issue - Firefox
+ [Tags] Known Issue Safari Known Issue Firefox
Mouse Down el_for_mousedown
Textfield Value Should Be el_for_mousedown mousedown el_for_mousedown
Run Keyword And Expect Error ERROR: Element not_there not found. Mouse Down not_there
Mouse Up
[Documentation] Mouse Up
- [Tags] Known Issue - Firefox
+ [Tags] Known Issue Safari Known Issue Firefox
Mouse Up el_for_mouseup
Textfield Value Should Be el_for_mouseup mouseup el_for_mouseup
Run Keyword And Expect Error ERROR: Element not_there not found. Mouse Up not_there
Oops, something went wrong.

0 comments on commit a2b3df4

Please sign in to comment.