Нет ключевого слова с ошибкой имени при использовании python appium с Robot Framework.
Я новичок в этой библиотеке appium и начал изучать интеграцию с Robot Framework с Python библиотекой appium. Очень ценю ваш ответ.
AndriodLibrary.py
import appium
from AppiumLibrary import AppiumLibrary
class Android(AppiumLibrary):
def __init__(self):
"""
Initializing all the Android definitions
"""
pass
def get_driver_instance(self):
return self._current_application()
@keyword(name='Login to BGApp')
def login_to_BGApp(self, email, pswd):
try:
appiumlib = BuiltIn().get_library_instance('AppiumLibrary')
driver = appiumlib._current_application()
driver.implicitly_wait (20)
login_button = driver.find_element_by_id(BGAppLogin).click()
driver.implicitly_wait (5)
# User credentials:
userid = driver.find_element_by_id (BG_Login_Email).send_keys (email)
password = driver.find_element_by_id (BG_Login_Pswd).send_keys (pswd)
СКРИПТ РОБОТА:
Library AppiumLibrary
Library ../lib/Android/AndroidLibrary.py
Suite Setup configure_setup
Suite Teardown Suite_Cleanup
*** Test Cases ***
TC_1 : Login to Android Device
[Tags] Login
[Documentation] Login to BGApp using user credentials
*** Keywords ***
configure_setup
Log to Console Initialize Setup
Open Application On Android
Login to BGApp ${AppLogin2.Email} ${AppLogin2.Pswd}
Open Application On Android
Open Application ${REMOTE_URL} ${PLATFORM_NAME} ${PLATFORM_VERSION} ${DEVICE_NAME} ${APP}
ВЫХОД
==============================================================================
AndroidLogin
==============================================================================
Initialize Setup
120
TC_1 : Login to Android Device :: Login to BGApp using user credentials | FAIL |
Parent suite setup failed:
No keyword with name 'Login to BGApp' found.
------------------------------------------------------------------------------
Cleaning Suite_Cleanup
AndroidLogin | FAIL |
Suite setup failed:
No keyword with name 'Login to BGApp' found.
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Уже указано. Robot Framework - передача драйвера Appium в python скрипт
После изменений, все еще получить ту же ошибку. Если какие-либо детали пропущены, пожалуйста, дайте мне знать. Поделюсь подробностями. Заранее спасибо.