*设置*
Library SeleniumLibrary
*变量*
${Browser} Firefox
${URL} https://allegis.ramcocloud.com/RVW/extui/vwrt/LaunchPanel.htm
*测试用例*
TC1 Browser Start and close
Open Browser ${URL} ${Browser}
Input Text name:ide_username INR004914
Input Text xpath://input[@name='ide_password'] tsip890*()
答案 0 :(得分:0)
我想错误是在第一个“输入文本”上。 尝试按照您在下面的说明复制其xpath
Input Text xpath://input[@name='ide_username'] INR004914
答案 1 :(得分:0)
您似乎很近。所需元素是启用了JavaScript的元素,因此您需要引发 wait ,并且可以使用(合并)侍应生中的任一个/两个,并且可以使用以下Locator Strategies :
诱导Wait Until Element Is Visible
:
TC1 Browser Start and close
Open Browser ${URL} ${Browser}
Wait Until Element Is Visible xpath://input[@id='ide_username' and @name='ide_username'] 20 seconds
Input Text xpath://input[@id='ide_username' and @name='ide_username'] INR004914
Input Text xpath://input[@name='ide_password'] tsip890*()
诱导Wait Until Element Is Enabled
:
TC1 Browser Start and close
Open Browser ${URL} ${Browser}
Wait Until Element Is Enabled xpath://input[@id='ide_username' and @name='ide_username'] 20 seconds
Input Text xpath://input[@id='ide_username' and @name='ide_username'] INR004914
Input Text xpath://input[@name='ide_password'] tsip890*()
您可以在How to click a row that has javascript on click event in RIDE中找到有关
Wait Until Element Is Visible
和Wait Until Element Is Enabled
的详细讨论
一些参考文献: