用硒机器人框架无限期地输入文本
我正在尝试使用以下机器人框架代码(Selenium)将长令牌(字符串)输入文本字段中。这是我输入此令牌字符串的屏幕截图。
1 Element should be enabled xpath=//input[@placeholder='token']
2 Click Element xpath=//input[@placeholder='token']
3 Input Text xpath=//input[@placeholder='token'] ${token}
但是出于某种原因,执行被卡在第3行,并最终被定时出局。 (300s)。由于第1行和第2行是成功的,因此能够找到文本框元素。知道我该如何解决这个问题?我正在使用Chromedriver。
样本 ${token}= eyJhbGciOiJSU0ExXzUiLCJjdHkiOiJKV1QiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwidHlwIjoiSldUIiwiemlwIjoiREVGIn0.et_wtlu9zrR_u79RvzcgXTdLsPRpYMXB22kH4M5B2nvg9J9yEE_ga0V2zQcwAPrz4g3vBroTKQ21DHByN4v3J2uX0wrkpmIgwF3xwMxKuJCsVZ4-Pf2jZ3ZiJsoKSaivNcPzDW-3VufquJU6ZPRPNzie0NxaQRW-jB1QlO1BqfRjAhTZNBC89xZmqmQZp_CVCm1S3dKY-6fDehx2CQyLgYyjfpUSlwa5TNdKh1EneHbVKqAYaTrJmBoBfk8x68_WyHqCWSrCRE3AxX5X0f27j4JRiuvDMYLDjMPFQMdXzWPH-VqBsY9GG20nsVw-UIxY98ElD2HBzBjRQwoDKzzPv9flxv1Ph_yljT9QkSjBO6iTD_Gd07nk391Rks_jcwTF8hFzIpQ8ImTx1zcntxPkpNFoClAOctQSdeqzgqbWC1KM4P1rncyhVop7T14FVSglVzU2EM7c2QRIoBclW94GvsGtnSXAXzyToQ8QU_qkXdgNQcSxahLfAKhrY3AaXr3y36GFN72J2d7IzO8jYGviAbbKCbUUv7CSVG3NxCThUvrs_yBcBgLpW943iH1ZJp64C1_AIv8JkP3189x7jJJWKk4nw7GW7jEc9DN5JjyDs3nwArvKQ5dyFnqD0aeRKyp5gJW8pyisLIhx2qGGPeMC8GGjCARspFIgLMvczNduaws.7yuAbwzx5nlde8BuWERVKg.fiV9LZdF0KYb3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3aBkEwuO2STPfIy2fnAbK0h8Z9_GF49jMunx66Q-q1AsNNoZxK-BrdqQY6WWsa0Rf__Ib-we6Ms82g1qrQ.GleGbCAM3mfgjhOzcjnpZA
I am trying to input text which is long token(string) into a Text field using following robot framework code (selenium). Here is screenshot where I am entering this token string.
1 Element should be enabled xpath=//input[@placeholder='token']
2 Click Element xpath=//input[@placeholder='token']
3 Input Text xpath=//input[@placeholder='token'] ${token}
But for some reason, execution gets stuck at line 3 and eventually gets timed out (300s). It is able to find the text box element since line 1 and 2, are successful. Any idea how can I resolve this issue? I am using chromedriver.
Sample${token}= eyJhbGciOiJSU0ExXzUiLCJjdHkiOiJKV1QiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwidHlwIjoiSldUIiwiemlwIjoiREVGIn0.et_wtlu9zrR_u79RvzcgXTdLsPRpYMXB22kH4M5B2nvg9J9yEE_ga0V2zQcwAPrz4g3vBroTKQ21DHByN4v3J2uX0wrkpmIgwF3xwMxKuJCsVZ4-Pf2jZ3ZiJsoKSaivNcPzDW-3VufquJU6ZPRPNzie0NxaQRW-jB1QlO1BqfRjAhTZNBC89xZmqmQZp_CVCm1S3dKY-6fDehx2CQyLgYyjfpUSlwa5TNdKh1EneHbVKqAYaTrJmBoBfk8x68_WyHqCWSrCRE3AxX5X0f27j4JRiuvDMYLDjMPFQMdXzWPH-VqBsY9GG20nsVw-UIxY98ElD2HBzBjRQwoDKzzPv9flxv1Ph_yljT9QkSjBO6iTD_Gd07nk391Rks_jcwTF8hFzIpQ8ImTx1zcntxPkpNFoClAOctQSdeqzgqbWC1KM4P1rncyhVop7T14FVSglVzU2EM7c2QRIoBclW94GvsGtnSXAXzyToQ8QU_qkXdgNQcSxahLfAKhrY3AaXr3y36GFN72J2d7IzO8jYGviAbbKCbUUv7CSVG3NxCThUvrs_yBcBgLpW943iH1ZJp64C1_AIv8JkP3189x7jJJWKk4nw7GW7jEc9DN5JjyDs3nwArvKQ5dyFnqD0aeRKyp5gJW8pyisLI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sgc6qrCcMQSCLedkKCabNVr7dgsCDMVmT4sP-m4RgtZPBVorx4VSwzEEIvp7-yQtcl3aBkEwuO2STPfIy2fnAbK0h8Z9_GF49jMunx66Q-q1AsNNoZxK-BrdqQY6WWsa0Rf__Ib-we6Ms82g1qrQ.GleGbCAM3mfgjhOzcjnpZA
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一一尝试这些解决方案:
Try these solutions one by one: