diff --git a/AppiumLibrary/keywords/_android_utils.py b/AppiumLibrary/keywords/_android_utils.py
index 9a2d7026..8fd32217 100644
--- a/AppiumLibrary/keywords/_android_utils.py
+++ b/AppiumLibrary/keywords/_android_utils.py
@@ -164,7 +164,8 @@ def set_location(self, latitude, longitude, altitude=10):
- _longitude_
- _altitude_ = 10 [optional]
- Android only
+ Android only.
+ New in AppiumLibrary 1.5
"""
driver = self._current_application()
driver.set_location(latitude,longitude,altitude)
diff --git a/AppiumLibrary/keywords/_applicationmanagement.py b/AppiumLibrary/keywords/_applicationmanagement.py
index 836c6e59..73faedc4 100644
--- a/AppiumLibrary/keywords/_applicationmanagement.py
+++ b/AppiumLibrary/keywords/_applicationmanagement.py
@@ -39,7 +39,7 @@ def close_all_applications(self):
def open_application(self, remote_url, alias=None, **kwargs):
"""Opens a new application to given Appium server.
Capabilities of appium server, Android and iOS,
- Please check http://appium.io/slate/en/master/?python#appium-server-capabilities
+ Please check https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/server-args.md
| *Option* | *Man.* | *Description* |
| remote_url | Yes | Appium server url |
| alias | no | alias |
@@ -186,6 +186,34 @@ def log_source(self, loglevel='INFO'):
else:
return ''
+ def execute_script(self, script):
+ """
+ Inject a snippet of JavaScript into the page for execution in the
+ context of the currently selected frame (Web context only).
+
+ The executed script is assumed to be synchronous and the result
+ of evaluating the script is returned to the client.
+
+ New in AppiumLibrary 1.5
+ """
+ return self._current_application().execute_script(script)
+
+ def execute_async_script(self, script):
+ """
+ Inject a snippet of Async-JavaScript into the page for execution in the
+ context of the currently selected frame (Web context only).
+
+ The executed script is assumed to be asynchronous and must signal that is done by
+ invoking the provided callback, which is always provided as the final argument to the
+ function.
+
+ The value to this callback will be returned to the client.
+
+
+ New in AppiumLibrary 1.5
+ """
+ return self._current_application().execute_async_script(script)
+
def go_back(self):
"""Goes one step backward in the browser history."""
self._current_application().back()
@@ -208,12 +236,16 @@ def touch_id(self, match=True):
Simulate Touch ID on iOS Simulator
`match` (boolean) whether the simulated fingerprint is valid (default true)
+
+ New in AppiumLibrary 1.5
"""
self._current_application().touch_id(match)
def toggle_touch_id_enrollment(self):
"""
Toggle Touch ID enrolled state on iOS Simulator
+
+ New in AppiumLibrary 1.5
"""
self._current_application().toggle_touch_id_enrollment()
diff --git a/AppiumLibrary/keywords/_logging.py b/AppiumLibrary/keywords/_logging.py
index 546fe1f0..16a950fd 100644
--- a/AppiumLibrary/keywords/_logging.py
+++ b/AppiumLibrary/keywords/_logging.py
@@ -2,6 +2,7 @@
import os
from robot.libraries.BuiltIn import BuiltIn
+from robot.libraries.BuiltIn import RobotNotRunningError
from robot.api import logger
from .keywordgroup import KeywordGroup
@@ -13,7 +14,11 @@ class _LoggingKeywords(KeywordGroup):
@property
def _log_level(self):
- return BuiltIn().get_variable_value("${APPIUM_LOG_LEVEL}", default='DEBUG')
+ try:
+ level = BuiltIn().get_variable_value("${APPIUM_LOG_LEVEL}", default='DEBUG')
+ except RobotNotRunningError:
+ level = 'DEBUG'
+ return level
def _debug(self, message):
if self._log_level in self.LOG_LEVEL_DEBUG:
diff --git a/AppiumLibrary/version.py b/AppiumLibrary/version.py
index 85402ffe..d9454ac6 100644
--- a/AppiumLibrary/version.py
+++ b/AppiumLibrary/version.py
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
-VERSION = '1.4.6'
+VERSION = '1.5'
diff --git a/CHANGES.rst b/CHANGES.rst
index 0287ea36..6430a153 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,5 +1,16 @@
History
=======
+1.5
+----------------
+- iOS predicates selector - new locator strategy
+- Execute Sync/Async Script in Web context - new keyword added
+- Long press has time parameter now
+- Added log-level filter for reporting
+- Set Location Keyword - new keyword added
+- Appium-Python library min-version bump
+- Simulate Touch ID on iOS Simulator
+
+
1.4.5
----------------
- Swipe By Percent - new keyword added
diff --git a/docs/AppiumLibrary.html b/docs/AppiumLibrary.html
index d593ce1f..7b4df7b6 100644
--- a/docs/AppiumLibrary.html
+++ b/docs/AppiumLibrary.html
@@ -5,8 +5,8 @@
-
-
+
+