编辑:由于我无法编辑赏金消息:“我没有 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 的要求,抛出以下错误:Error in execute_lua(splash_obj, call_function) : Bad Request (HTTP 400).
最佳答案
尝试替换 'enter'
与 '<enter>'
看看是否有效。括号内的文字代表功能键。
这是QT使用的键名列表
https://doc.qt.io/qt-5/qt.html#Key-enum
https://stackoverflow.com/questions/63765037/