机器人框架顽固“元素在5秒内没有出现”错误
我正在编写一个机器人框架脚本来填写表格。简单的脚本,使用一本小字典,其余的都可以工作,但我似乎无法与这个特定的领域进行交互。我已经尝试了近十几种与该元素交互的方法,但没有一种有效。你们能帮我一下吗?这是我的代码。
Documentation Frevvo Form
Library Zoomba.GUILibrary
Library Process
Resource ../../Pages/resource.robot
Suite Setup Browser Setup ${url} ${browser}
*** Keywords ***
Student Form Data
[Arguments] ${Frevvo}
Run Keyword If '${Frevvo}[TulaneID]'!='${EMPTY}' Wait For And Input Text ${TulaneID} ${Frevvo}[TulaneID]
Run Keyword If '${Frevvo}[Term]'!='${EMPTY}' Wait For And Input Text ${Term} ${Frevvo}[Term]
*** Variables ***
${TulaneID} //*[contains(name(),'TulaneID')]
[already tried the below - no success]
#//input[@name='TulaneID']
#//input[@id='w11562aab5b4b2']
#//*[@id="w11562aab5b4b2"]
#//*[@name="TulaneID"]
#//*[@id="_5le4NoQ-EeyE6Z5Sq_0wTQ"]
*** Test Cases ***
TC 001 Basic Frevvo
Set To Dictionary ${Frevvo} TulaneID=211003560 Term=2022 Spring
Login
Student Form Data ${Frevvo}
I'm writing up a Robot Framework script to fill out a form. Simple script, using a small dictionary, all the rest of it is working but I can't seem to interact with this certain field. I've tried almost a dozen ways to interact with the element, but none of them are working. Can you guys help me out here? Here's my code.
Documentation Frevvo Form
Library Zoomba.GUILibrary
Library Process
Resource ../../Pages/resource.robot
Suite Setup Browser Setup ${url} ${browser}
*** Keywords ***
Student Form Data
[Arguments] ${Frevvo}
Run Keyword If '${Frevvo}[TulaneID]'!='${EMPTY}' Wait For And Input Text ${TulaneID} ${Frevvo}[TulaneID]
Run Keyword If '${Frevvo}[Term]'!='${EMPTY}' Wait For And Input Text ${Term} ${Frevvo}[Term]
*** Variables ***
${TulaneID} //*[contains(name(),'TulaneID')]
[already tried the below - no success]
#//input[@name='TulaneID']
#//input[@id='w11562aab5b4b2']
#//*[@id="w11562aab5b4b2"]
#//*[@name="TulaneID"]
#//*[@id="_5le4NoQ-EeyE6Z5Sq_0wTQ"]
*** Test Cases ***
TC 001 Basic Frevvo
Set To Dictionary ${Frevvo} TulaneID=211003560 Term=2022 Spring
Login
Student Form Data ${Frevvo}
And here is the HTML of the page. The element I need is in the highlighted part
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试以下,
Try following,