2017-03-15 3 views
0

ich die ExtendedAppiumLibraryImportieren "ExtendedAppiumLibrary" failed (Robot Framework)

mit heruntergeladen
pip install robotframework-extendedappiumlibrary 

Nach dem Download habe ich versucht, "ExtendedAppiumLibrary" in meinem Projekt zu importieren und seine mir folgende Fehler geben:

C:\Windows\System32>ride.py 
FAILED ExtendedAppiumLibrary Initializing test library 'ExtendedAppiumLibrary' with no arguments failed: ValueError: Invalid time string 'Capture Page Scre 
enshot'. 
Traceback (most recent call last): 
    File "C:\Python27\Lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 184, in _get_instance 
    return libcode(*self.positional_args, **self.named_args) 
    File "C:\Python27\Lib\site-packages\ExtendedAppiumLibrary\__init__.py", line 78, in __init__ 
    AppiumLibrary.__init__(self, run_on_failure) 
    File "C:\Python27\Lib\site-packages\AppiumLibrary\__init__.py", line 99, in __init__ 
    self.set_appium_timeout(timeout) 
    File "<decorator-gen-36>", line 2, in set_appium_timeout 
    File "C:\Python27\Lib\site-packages\AppiumLibrary\keywords\keywordgroup.py", line 15, in _run_on_failure_decorator 
    return method(*args, **kwargs) 
    File "C:\Python27\Lib\site-packages\AppiumLibrary\keywords\_applicationmanagement.py", line 121, in set_appium_timeout 
    self._timeout_in_secs = robot.utils.timestr_to_secs(seconds) 
    File "C:\Python27\Lib\site-packages\robot\utils\robottime.py", line 48, in timestr_to_secs 
    raise ValueError("Invalid time string '%s'." % timestr) 

enter image description here

+0

Wie importieren Sie es? – Goralight

+0

In RIDE unter Import library> Name "ExtendedAppiumLibrary" –

+0

Laut seiner GitHub-Seite ist die Bibliothek seit mehr als anderthalb Jahren im End of Life-Zyklus; Vielleicht würden Sie in Erwägung ziehen, die offizielle Appium-Bibliothek (https://github.com/serhatbolsu/robotframework-appiumlibrary) zu verwenden, und sehen, ob das Problem gelöst wird? Sie würden mir auch Unterstützung von der Community bringen. – Todor

Antwort

0

erste Hinweis ist in der RF-Importfehler:

FAILED ExtendedAppiumLibrary Initializing test library 'ExtendedAppiumLibrary' with no arguments failed: ValueError: Invalid time string 'Capture Page Scre enshot'.

Mal sehen, was docs sagt über Initialisierung/lib RF Suite importieren: https://github.com/serhatbolsu/robotframework-appiumlibrary/blob/master/docs/AppiumLibrary.html (Github machen nicht richtig anzeigt, so dass Sie Datei auf der Festplatte speichern müssen und laden Sie es in html sehen gerendert)

unter den Import Abschnitt:

run_on_failure=Capture Page Screenshot ExtendedAppiumLibrary can be imported with optional arguments.

run_on_failure specifies the name of a keyword (from any available libraries) to execute when a ExtendedAppiumLibrary keyword fails. By default

Capture Page Screenshot will be used to take a screenshot of the current page. Using the value No Operation will disable this feature altogether. See

Register Keyword To Run On Failure keyword for more information about this functionality.

example: Library ExtendedAppiumLibrary run_on_failure=No Operation # Does nothing on failure

Verwandte Themen