Search code examples
frameworksrobotframework

Robot Framework Stubborn "Element did not appear in 5 seconds" error


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 Highlighted Element


Solution

  • Try following,

    *** Variables ***
    
    ${TulaneID}           xpath=//input[@id='w11562aab5b4b2']