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

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Selenium2Library/keywords/_browsermanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

from .keywordgroup import KeywordGroup

try:
unicode = unicode
except:
unicode = str

ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
FIREFOX_PROFILE_DIR = os.path.join(ROOT_DIR, 'resources', 'firefoxprofile')
Expand Down
5 changes: 5 additions & 0 deletions src/Selenium2Library/keywords/_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

from .keywordgroup import KeywordGroup

try:
unicode = unicode
except NameError:
basestring = (str,bytes)


class _ElementKeywords(KeywordGroup):

Expand Down
1 change: 1 addition & 0 deletions src/Selenium2Library/keywords/_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from robot.api import logger
from robot.libraries.BuiltIn import BuiltIn

try:
from robot.libraries.BuiltIn import RobotNotRunningError
except ImportError: # Support RF < 2.8.5
Expand Down
7 changes: 3 additions & 4 deletions src/Selenium2Library/keywords/keywordgroup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import inspect

from decorator import decorator
from future.utils import with_metaclass


def _run_on_failure_decorator(method, *args, **kwargs):
Expand Down Expand Up @@ -32,6 +32,5 @@ def __new__(cls, clsname, bases, dict):
dict[name] = decorator(_run_on_failure_decorator, method)
return type.__new__(cls, clsname, bases, dict)


class KeywordGroup(object):
__metaclass__ = KeywordGroupMetaClass
class KeywordGroup(with_metaclass(KeywordGroupMetaClass, object)):
pass
6 changes: 6 additions & 0 deletions src/Selenium2Library/locators/customlocator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
from builtins import object
from robot.libraries.BuiltIn import BuiltIn

try:
unicode = unicode
except NameError:
basestring = (str,bytes)


class CustomLocator(object):

Expand Down
3 changes: 2 additions & 1 deletion src/Selenium2Library/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from builtins import str
from . import events
from .browsercache import BrowserCache
from .librarylistener import LibraryListener


def escape_xpath_value(value):
value = unicode(value)
value = str(value)
if '"' in value and '\'' in value:
parts_wo_apos = value.split('\'')
return "concat('%s')" % "', \"'\", '".join(parts_wo_apos)
Expand Down
1 change: 1 addition & 0 deletions src/Selenium2Library/utils/events/event.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import abc
from builtins import object


class Event(object):
Expand Down