1
アプリケーションへのログインを試行中に以下のエラーが表示されます。だから、私はユーザー名のテキストボックスにユーザー名を入力しようとしています。pythonでsend_keyを実行する際に問題が発生する
username = (By.ID, 'user_name')
password = (By.ID, 'user_password')
signin = (By.ID, 'user_login')
@given('user is logged in to the application')
def step_impl(context):
driver = context.browser
driver.get(test_url)
driver.maximize_window()
driver.find_element(username).send_keys("test")
driver.find_element(password).send_keys("test")
driver.find_element(signin).click()
エラーメッセージは以下の通りである - - これは、サンプルのステップの定義ファイルである
driver.find_element(username).send_keys("testing")
emote\webdriver.py", line 752, in find_element\webdriver
'value': value})['value']
emote\webdriver.py", line 236, in executeenium\webdriver
self.error_handler.check_response(response)
emote\errorhandler.py", line 192, in check_responseriver
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: unknown error: 'using' must be a string
(Session info: chrome=54.0.2840.99)
(Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f93
4aab9eed),platform=Windows NT 6.1.7601 SP1 x86_64)