Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ before_install:
- unzip chromedriver_linux64.zip
- sudo chmod u+x chromedriver
- sudo mv chromedriver /usr/bin/
- pip install --upgrade pip
install:
- pip install .
- pip install -r requirements.txt
Expand All @@ -34,12 +35,12 @@ matrix:
- BROWSER=chrome
- SELENIUM=3.3.1
- ROBOTFRAMEWORK=2.8.7
- python: "3.3" # For PR and cron
- python: "3.6" # For PR and cron
env:
- BROWSER=chrome
- SELENIUM=2.53.6
- ROBOTFRAMEWORK=3.0.2
- python: "3.3" # For cron only
- python: "3.6" # For cron only
env:
- BROWSER=firefox
- SELENIUM=2.53.6
Expand Down
5 changes: 5 additions & 0 deletions src/Selenium2Library/keywords/browsermanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,11 @@ def _create_remote_web_driver(self , capabilities_type , remote_url , desired_ca
creates the associated remote web driver'''

desired_capabilities_object = capabilities_type.copy()

try:
unicode # Python 2
except NameError:
unicode = str # Python 3

if type(desired_capabilities) in (str, unicode):
desired_capabilities = self._parse_capabilities_string(desired_capabilities)
Expand Down
4 changes: 4 additions & 0 deletions src/Selenium2Library/keywords/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

from .keywordgroup import KeywordGroup

try:
basestring # Python 2
except NameError:
basestring = str # Python 3

class ElementKeywords(KeywordGroup):

Expand Down
5 changes: 5 additions & 0 deletions src/Selenium2Library/locators/customlocator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
from robot.libraries.BuiltIn import BuiltIn

try:
basestring # Python 2
except NameError:
basestring = str # Python 3


class CustomLocator(object):

Expand Down
5 changes: 4 additions & 1 deletion src/Selenium2Library/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@


def escape_xpath_value(value):
value = unicode(value)
try:
value = unicode(value) # Python 2
except NameError:
pass # Python 3
if '"' in value and '\'' in value:
parts_wo_apos = value.split('\'')
return "concat('%s')" % "', \"'\", '".join(parts_wo_apos)
Expand Down