`Enter`键在splashR::splash_send_key中无法发送

编辑:由于我无法编辑赏金信息:“我没有Lua方面的专业知识,无法自行解决此问题。我希望有人可以帮助我。”

使用以下代码段,我想使用splashR自动登录我的strava.com帐户。不幸的是,似乎回车键无法发送到登录凭据的网站表单字段。我还尝试发送鼠标单击以登录按钮。有人知道做此操作的诀窍吗?

library(splashr)
splash_local %>%
splash_go(url='https://www.strava.com/login')%>%
splash_focus("#email")%>%
splash_send_text('username')%>%
splash_focus("#password")%>%
splash_send_text("password")%>%
splash_focus("#password")%>%
splash_send_keys('enter')%>%
#splash_click(x = 550, y = 567) %>%
   splash_png()

编辑:将 'enter' 替换为 '<enter>',如 @roger-123 所请求的那样,会抛出以下错误:执行_lua(splash_obj,call_function)时出错:Bad Request(HTTP 400)。

点赞
用户4572068
用户4572068

尝试使用'<enter>'替换'enter'并查看是否有效。括号内的单词表示功能键。

以下是QT使用的键名列表

https://doc.qt.io/qt-5/qt.html#Key-enum

2020-09-11 16:38:22
用户12925669
用户12925669

尝试使用 <Return> 而不是 <enter> 或者 enter。

2021-03-11 16:09:46